Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
eventcompatibility.php
1<?php
5
9
10Loc::loadMessages(__FILE__);
11
13{
14 /* Events old kernel, which will be called in a new kernel */
15
16 /* class \CProduct */
17 const ENTITY_PRODUCT = 'Product';
18 const EVENT_ON_BEFORE_PRODUCT_ADD = 'OnBeforeProductAdd';
19 const EVENT_ON_PRODUCT_ADD = 'OnProductAdd';
20 const EVENT_ON_BEFORE_PRODUCT_UPDATE = 'OnBeforeProductUpdate';
21 const EVENT_ON_PRODUCT_UPDATE = 'OnProductUpdate';
22
23 /* class \CPrice */
24 const ENTITY_PRICE = 'Price';
25 const EVENT_ON_BEFORE_PRICE_ADD = 'OnBeforePriceAdd';
26 const EVENT_ON_PRICE_ADD = 'OnPriceAdd';
27 const EVENT_ON_BEFORE_PRICE_UPDATE = 'OnBeforePriceUpdate';
28 const EVENT_ON_PRICE_UPDATE = 'OnPriceUpdate';
29 const EVENT_ON_BEFORE_PRICE_DELETE = 'OnBeforePriceDelete';
30 const EVENT_ON_PRICE_DELETE = 'OnPriceDelete';
31
32 private static $allowEvents = 0;
33
34 private static $handlerList = [];
35
36 private static $whiteList = [];
37
38 private static $entityClass = [
39 self::ENTITY_PRODUCT => '\Bitrix\Catalog\Model\Product',
40 self::ENTITY_PRICE => '\Bitrix\Catalog\Model\Price'
41 ];
42
43 public static function execAgent()
44 {
46 return '';
47 }
48
49 public static function registerEvents()
50 {
51 $eventManager = Main\EventManager::getInstance();
52
53 $eventManager->registerEventHandler(
54 'catalog', 'Bitrix\Catalog\Model\Product::'.Main\Entity\DataManager::EVENT_ON_BEFORE_ADD,
55 'catalog', __CLASS__, 'handlerProductOnBeforeAdd'
56 );
57 $eventManager->registerEventHandler(
58 'catalog', 'Bitrix\Catalog\Model\Product::'.Main\Entity\DataManager::EVENT_ON_AFTER_ADD,
59 'catalog', __CLASS__, 'handlerProductOnAfterAdd'
60 );
61
62 $eventManager->registerEventHandler(
63 'catalog', 'Bitrix\Catalog\Model\Product::'.Main\Entity\DataManager::EVENT_ON_BEFORE_UPDATE,
64 'catalog', __CLASS__, 'handlerProductOnBeforeUpdate'
65 );
66 $eventManager->registerEventHandler(
67 'catalog', 'Bitrix\Catalog\Model\Product::'.Main\Entity\DataManager::EVENT_ON_AFTER_UPDATE,
68 'catalog', __CLASS__, 'handlerProductOnAfterUpdate'
69 );
70
71 $eventManager->registerEventHandler(
72 'catalog', 'Bitrix\Catalog\Model\Price::'.Main\Entity\DataManager::EVENT_ON_BEFORE_ADD,
73 'catalog', __CLASS__, 'handlerPriceOnBeforeAdd'
74 );
75 $eventManager->registerEventHandler(
76 'catalog', 'Bitrix\Catalog\Model\Price::'.Main\Entity\DataManager::EVENT_ON_AFTER_ADD,
77 'catalog', __CLASS__, 'handlerPriceOnAfterAdd'
78 );
79
80 $eventManager->registerEventHandler(
81 'catalog', 'Bitrix\Catalog\Model\Price::'.Main\Entity\DataManager::EVENT_ON_BEFORE_UPDATE,
82 'catalog', __CLASS__, 'handlerPriceOnBeforeUpdate'
83 );
84 $eventManager->registerEventHandler(
85 'catalog', 'Bitrix\Catalog\Model\Price::'.Main\Entity\DataManager::EVENT_ON_AFTER_UPDATE,
86 'catalog', __CLASS__, 'handlerPriceOnAfterUpdate'
87 );
88
89 $eventManager->registerEventHandler(
90 'catalog', 'Bitrix\Catalog\Model\Price::'.Main\Entity\DataManager::EVENT_ON_BEFORE_DELETE,
91 'catalog', __CLASS__, 'handlerPriceOnBeforeDelete'
92 );
93 $eventManager->registerEventHandler(
94 'catalog', 'Bitrix\Catalog\Model\Price::'.Main\Entity\DataManager::EVENT_ON_AFTER_DELETE,
95 'catalog', __CLASS__, 'handlerPriceOnAfterDelete'
96 );
97
98 unset($eventManager);
99 }
100
101 public static function unRegisterEvents()
102 {
103 $eventManager = Main\EventManager::getInstance();
104
105 $eventManager->unRegisterEventHandler(
106 'catalog', 'Bitrix\Catalog\Model\Product::'.Main\Entity\DataManager::EVENT_ON_BEFORE_ADD,
107 'catalog', __CLASS__, 'handlerProductOnBeforeAdd'
108 );
109 $eventManager->unRegisterEventHandler(
110 'catalog', 'Bitrix\Catalog\Model\Product::'.Main\Entity\DataManager::EVENT_ON_AFTER_ADD,
111 'catalog', __CLASS__, 'handlerProductOnAfterAdd'
112 );
113
114 $eventManager->unRegisterEventHandler(
115 'catalog', 'Bitrix\Catalog\Model\Product::'.Main\Entity\DataManager::EVENT_ON_BEFORE_UPDATE,
116 'catalog', __CLASS__, 'handlerProductOnBeforeUpdate'
117 );
118 $eventManager->unRegisterEventHandler(
119 'catalog', 'Bitrix\Catalog\Model\Product::'.Main\Entity\DataManager::EVENT_ON_AFTER_UPDATE,
120 'catalog', __CLASS__, 'handlerProductOnAfterUpdate'
121 );
122
123 $eventManager->unRegisterEventHandler(
124 'catalog', 'Bitrix\Catalog\Model\Price::'.Main\Entity\DataManager::EVENT_ON_BEFORE_ADD,
125 'catalog', __CLASS__, 'handlerPriceOnBeforeAdd'
126 );
127 $eventManager->unRegisterEventHandler(
128 'catalog', 'Bitrix\Catalog\Model\Price::'.Main\Entity\DataManager::EVENT_ON_AFTER_ADD,
129 'catalog', __CLASS__, 'handlerPriceOnAfterAdd'
130 );
131
132 $eventManager->unRegisterEventHandler(
133 'catalog', 'Bitrix\Catalog\Model\Price::'.Main\Entity\DataManager::EVENT_ON_BEFORE_UPDATE,
134 'catalog', __CLASS__, 'handlerPriceOnBeforeUpdate'
135 );
136 $eventManager->unRegisterEventHandler(
137 'catalog', 'Bitrix\Catalog\Model\Price::'.Main\Entity\DataManager::EVENT_ON_AFTER_UPDATE,
138 'catalog', __CLASS__, 'handlerPriceOnAfterUpdate'
139 );
140
141 $eventManager->unRegisterEventHandler(
142 'catalog', 'Bitrix\Catalog\Model\Price::'.Main\Entity\DataManager::EVENT_ON_BEFORE_DELETE,
143 'catalog', __CLASS__, 'handlerPriceOnBeforeDelete'
144 );
145 $eventManager->unRegisterEventHandler(
146 'catalog', 'Bitrix\Catalog\Model\Price::'.Main\Entity\DataManager::EVENT_ON_AFTER_DELETE,
147 'catalog', __CLASS__, 'handlerPriceOnAfterDelete'
148 );
149
150 unset($eventManager);
151 }
152
153 public static function handlerProductOnBeforeAdd(Catalog\Model\Event $event)
154 {
155 return self::handlerOnBeforeAdd($event, self::ENTITY_PRODUCT, self::EVENT_ON_BEFORE_PRODUCT_ADD);
156 }
157
158 public static function handlerProductOnAfterAdd(Catalog\Model\Event $event)
159 {
160 $result = new Catalog\Model\EventResult();
161 if (!self::allowedEvents())
162 return $result;
163
164 $success = $event->getParameter('success');
165 if (!$success)
166 return $result;
167
168 self::disableEvents();
169
170 $handlerList = array_merge(
171 self::getHandlerList('catalog', self::EVENT_ON_PRODUCT_ADD),
172 self::getHandlerList('sale', self::EVENT_ON_PRODUCT_ADD) // compatibility with old strange code
173 );
174 if (!empty($handlerList))
175 {
176 $data = [
177 $event->getParameter('id'),
178 $event->getParameter('fields') + $event->getParameter('external_fields')
179 ];
180
181 foreach ($handlerList as $handler)
182 {
183 ExecuteModuleEventEx($handler, $data);
184 }
185 unset($handler, $data);
186 }
187 unset($handlerList);
188
189 self::enableEvents();
190
191 return $result;
192 }
193
194 public static function handlerProductOnBeforeUpdate(Catalog\Model\Event $event)
195 {
196 return self::handlerOnBeforeUpdate($event, self::ENTITY_PRODUCT, self::EVENT_ON_BEFORE_PRODUCT_UPDATE);
197 }
198
199 public static function handlerProductOnAfterUpdate(Catalog\Model\Event $event)
200 {
201 return self::handlerOnAfterModify($event, self::EVENT_ON_PRODUCT_UPDATE);
202 }
203
204 public static function handlerPriceOnBeforeAdd(Catalog\Model\Event $event)
205 {
206 $result = new Catalog\Model\EventResult();
207 if (!self::allowedEvents())
208 return $result;
209
210 self::disableEvents();
211
212 $handlerList = self::getHandlerList('catalog', self::EVENT_ON_BEFORE_PRICE_ADD);
213
214 if (!empty($handlerList))
215 {
216 $error = false;
217 $fields = $event->getParameter('fields');
218 $externalFields = $event->getParameter('external_fields');
219 $oldFields = $fields;
220 $oldExternalFields = $externalFields;
221 $actions = $event->getParameter('actions');
222 $fields['RECALL'] = (isset($actions['OLD_RECOUNT']) && $actions['OLD_RECOUNT'] === true);
223
224 foreach ($handlerList as $handler)
225 {
226 if (ExecuteModuleEventEx($handler, [&$fields]) === false)
227 {
228 $error = true;
229 break;
230 }
231 }
232 unset($handler);
233
234 if (isset($fields['RECALL']))
235 {
236 $result->modifyActions(['OLD_RECOUNT' => $fields['RECALL']]);
237 unset($fields['RECALL']);
238 }
239 else
240 {
241 if (isset($actions['OLD_RECOUNT']))
242 $result->unsetActions(['OLD_RECOUNT']);
243 }
244
245 self::fillResultData($result, self::ENTITY_PRICE, $oldFields, $oldExternalFields, $fields);
246 unset($actions, $oldExternalFields, $oldFields, $externalFields, $fields);
247
248 if ($error)
249 self::setHandlerError($result, self::EVENT_ON_BEFORE_PRICE_ADD);
250 unset($error);
251 }
252
253 self::enableEvents();
254
255 return $result;
256 }
257
258 public static function handlerPriceOnAfterAdd(Catalog\Model\Event $event)
259 {
260 $result = new Catalog\Model\EventResult();
261 if (!self::allowedEvents())
262 return $result;
263
264 $success = $event->getParameter('success');
265 if (!$success)
266 return $result;
267
268 self::disableEvents();
269
270 $handlerList = array_merge(
271 self::getHandlerList('catalog', self::EVENT_ON_PRICE_ADD),
272 self::getHandlerList('sale', self::EVENT_ON_PRICE_ADD) // compatibility with old strange code
273 );
274 if (!empty($handlerList))
275 {
276 $fields = $event->getParameter('fields');
277 $actions = $event->getParameter('actions');
278 $fields['RECALL'] = (isset($actions['OLD_RECOUNT']) && $actions['OLD_RECOUNT'] === true);
279 $data = [
280 $event->getParameter('id'),
281 $fields + $event->getParameter('external_fields')
282 ];
283 unset($actions, $fields);
284
285 foreach ($handlerList as $handler)
286 {
287 ExecuteModuleEventEx($handler, $data);
288 }
289 unset($handler, $data);
290 }
291 unset($handlerList);
292
293 self::enableEvents();
294
295 return $result;
296 }
297
298 public static function handlerPriceOnBeforeUpdate(Catalog\Model\Event $event)
299 {
300 $result = new Catalog\Model\EventResult();
301 if (!self::allowedEvents())
302 return $result;
303
304 self::disableEvents();
305
306 $handlerList = self::getHandlerList('catalog', self::EVENT_ON_BEFORE_PRICE_UPDATE);
307 if (!empty($handlerList))
308 {
309 $error = false;
310 $id = $event->getParameter('id');
311 $fields = $event->getParameter('fields');
312 $externalFields = $event->getParameter('external_fields');
313 $oldFields = $fields;
314 $oldExternalFields = $externalFields;
315 $actions = $event->getParameter('actions');
316 $fields['RECALL'] = (isset($actions['OLD_RECOUNT']) && $actions['OLD_RECOUNT'] === true);
317
318 foreach ($handlerList as $handler)
319 {
320 if (ExecuteModuleEventEx($handler, [$id, &$fields]) === false)
321 {
322 $error = true;
323 break;
324 }
325 }
326 unset($handler);
327
328 if (isset($fields['RECALL']))
329 {
330 $result->modifyActions(['OLD_RECOUNT' => $fields['RECALL']]);
331 unset($fields['RECALL']);
332 }
333 else
334 {
335 if (isset($actions['OLD_RECOUNT']))
336 $result->unsetActions(['OLD_RECOUNT']);
337 }
338
339 self::fillResultData($result, self::ENTITY_PRICE, $oldFields, $oldExternalFields, $fields);
340 unset($actions, $oldExternalFields, $oldFields, $externalFields, $fields);
341
342 if ($error)
343 self::setHandlerError($result, self::EVENT_ON_BEFORE_PRICE_UPDATE);
344 unset($error);
345 }
346 unset($handlerList);
347
348 self::enableEvents();
349
350 return $result;
351 }
352
353 public static function handlerPriceOnAfterUpdate(Catalog\Model\Event $event)
354 {
355 return self::handlerPriceOnAfterModify($event, self::EVENT_ON_PRICE_UPDATE);
356 }
357
358 public static function handlerPriceOnBeforeDelete(Catalog\Model\Event $event)
359 {
360 return self::handlerOnBeforeDelete($event, self::EVENT_ON_BEFORE_PRICE_DELETE);
361 }
362
363 public static function handlerPriceOnAfterDelete(Catalog\Model\Event $event)
364 {
365 return self::handlerOnAfterDelete($event, self::EVENT_ON_PRICE_DELETE);
366 }
367
373 private static function enableEvents()
374 {
375 self::$allowEvents++;
376 }
377
383 private static function disableEvents()
384 {
385 self::$allowEvents--;
386 }
387
393 private static function allowedEvents()
394 {
395 return (self::$allowEvents >= 0);
396 }
397
398 private static function getHandlerList($module, $event)
399 {
400 $eventIndex = $module.':'.$event;
401 if (!isset(self::$handlerList[$eventIndex]))
402 {
403 self::$handlerList[$eventIndex] = [];
404 $eventManager = Main\EventManager::getInstance();
405 $result = $eventManager->findEventHandlers($module, $event);
406 if (!empty($result))
407 {
408 foreach (array_keys($result) as $index)
409 {
410 $result[$index]['FROM_MODULE_ID'] = 'catalog';
411 $result[$index]['MESSAGE_ID'] = $event;
412 }
413 unset($index);
414 self::$handlerList[$eventIndex] = $result;
415 }
416 unset($result, $eventManager);
417 }
418 return self::$handlerList[$eventIndex];
419 }
420
421 private static function handlerOnBeforeAdd(Catalog\Model\Event $event, $entity, $eventName)
422 {
423 $result = new Catalog\Model\EventResult();
424 if (!self::allowedEvents())
425 return $result;
426
427 self::disableEvents();
428
429 $handlerList = self::getHandlerList('catalog', $eventName);
430 if (!empty($handlerList))
431 {
432 $error = false;
433 $fields = $event->getParameter('fields');
434 $externalFields = $event->getParameter('external_fields');
435 $oldFields = $fields;
436 $oldExternalFields = $externalFields;
437 if (!empty($externalFields))
438 $fields = $fields + $externalFields;
439
440 foreach ($handlerList as $handler)
441 {
442 if (ExecuteModuleEventEx($handler, [&$fields]) === false)
443 {
444 $error = true;
445 break;
446 }
447 }
448 unset($handler);
449
450 self::fillResultData($result, $entity, $oldFields, $oldExternalFields, $fields);
451 unset($oldExternalFields, $oldFields, $externalFields, $fields);
452
453 if ($error)
454 self::setHandlerError($result, $eventName);
455 unset($error);
456 }
457
458 self::enableEvents();
459
460 return $result;
461 }
462
463 private static function handlerOnAfterModify(Catalog\Model\Event $event, $eventName)
464 {
465 $result = new Catalog\Model\EventResult();
466 if (!self::allowedEvents())
467 return $result;
468
469 $success = $event->getParameter('success');
470 if (!$success)
471 return $result;
472
473 self::disableEvents();
474
475 $handlerList = self::getHandlerList('catalog', $eventName);
476 if (!empty($handlerList))
477 {
478 $data = [
479 $event->getParameter('id'),
480 $event->getParameter('fields') + $event->getParameter('external_fields')
481 ];
482
483 foreach ($handlerList as $handler)
484 {
485 ExecuteModuleEventEx($handler, $data);
486 }
487 unset($handler, $data);
488 }
489 unset($handlerList);
490
491 self::enableEvents();
492
493 return $result;
494 }
495
496 private static function handlerOnBeforeUpdate(Catalog\Model\Event $event, $entity, $eventName)
497 {
498 $result = new Catalog\Model\EventResult();
499 if (!self::allowedEvents())
500 return $result;
501
502 self::disableEvents();
503
504 $handlerList = self::getHandlerList('catalog', $eventName);
505 if (!empty($handlerList))
506 {
507 $error = false;
508 $id = $event->getParameter('id');
509 $fields = $event->getParameter('fields');
510 $externalFields = $event->getParameter('external_fields');
511 $oldFields = $fields;
512 $oldExternalFields = $externalFields;
513 if (!empty($externalFields))
514 $fields = $fields + $externalFields;
515
516 foreach ($handlerList as $handler)
517 {
518 if (ExecuteModuleEventEx($handler, [$id, &$fields]) === false)
519 {
520 $error = true;
521 break;
522 }
523 }
524 unset($handler);
525
526 self::fillResultData($result, $entity, $oldFields, $oldExternalFields, $fields);
527 unset($oldExternalFields, $oldFields, $externalFields, $fields);
528
529 if ($error)
530 self::setHandlerError($result, $eventName);
531 unset($error);
532 }
533 unset($handlerList);
534
535 self::enableEvents();
536
537 return $result;
538 }
539
540 private static function handlerOnBeforeDelete(Catalog\Model\Event $event, $eventName)
541 {
542 $result = new Catalog\Model\EventResult();
543 if (!self::allowedEvents())
544 return $result;
545
546 self::disableEvents();
547
548 $handlerList = self::getHandlerList('catalog', $eventName);
549 if (!empty($handlerList))
550 {
551 $error = false;
552 $id = $event->getParameter('id');
553
554 foreach ($handlerList as $handler)
555 {
556 if (ExecuteModuleEventEx($handler, [$id]) === false)
557 {
558 $error = true;
559 break;
560 }
561 }
562 unset($handler);
563
564 if ($error)
565 self::setHandlerError($result, $eventName);
566 unset($id, $error);
567 }
568
569 self::enableEvents();
570
571 return $result;
572 }
573
574 private static function handlerOnAfterDelete(Catalog\Model\Event $event, $eventName)
575 {
576 $result = new Catalog\Model\EventResult();
577 if (!self::allowedEvents())
578 return $result;
579
580 $success = $event->getParameter('success');
581 if (!$success)
582 return $result;
583
584 self::disableEvents();
585
586 $handlerList = self::getHandlerList('catalog', $eventName);
587 if (!empty($handlerList))
588 {
589 $data = [
590 $event->getParameter('id')
591 ];
592
593 foreach ($handlerList as $handler)
594 {
595 ExecuteModuleEventEx($handler, $data);
596 }
597 unset($handler, $data);
598 }
599 unset($handlerList);
600
601 self::enableEvents();
602
603 return $result;
604 }
605
606 private static function handlerPriceOnAfterModify(Catalog\Model\Event $event, $eventName)
607 {
608 $result = new Catalog\Model\EventResult();
609 if (!self::allowedEvents())
610 return $result;
611
612 $success = $event->getParameter('success');
613 if (!$success)
614 return $result;
615
616 self::disableEvents();
617
618 $handlerList = self::getHandlerList('catalog', $eventName);
619 if (!empty($handlerList))
620 {
621 $fields = $event->getParameter('fields');
622 $actions = $event->getParameter('actions');
623 $fields['RECALL'] = (isset($actions['OLD_RECOUNT']) && $actions['OLD_RECOUNT'] === true);
624 $data = [
625 $event->getParameter('id'),
626 $fields + $event->getParameter('external_fields')
627 ];
628 unset($actions, $fields);
629
630 foreach ($handlerList as $handler)
631 {
632 ExecuteModuleEventEx($handler, $data);
633 }
634 unset($handler, $data);
635 }
636 unset($handlerList);
637
638 self::enableEvents();
639
640 return $result;
641 }
642
643 private static function setHandlerError(Catalog\Model\EventResult $result, $eventName)
644 {
645 global $APPLICATION;
646
647 $oldException = $APPLICATION->GetException();
648 if (is_object($oldException))
649 {
650 $result->addError(new Main\Entity\EntityError(
651 $oldException->GetString()
652 ));
653 }
654 else
655 {
656 $result->addError(new Main\Entity\EntityError(
658 'BX_CATALOG_EVENT_COMPATIBILITY_ERR_UNKNOWN',
659 ['#EVENT#' => $eventName]
660 )
661 ));
662 }
663 unset($oldException);
664 }
665
666 private static function fillResultData(
667 Catalog\Model\EventResult $result,
668 $entity,
669 array $fields,
670 array $externalFields,
671 array $handlerFields
672 )
673 {
674 $unsetFields = [];
675 $modifyFields = [];
676 $unsetExternalFields = [];
677 $modifyExternalFields = [];
678
679 if (!isset(self::$entityClass[$entity]))
680 {
681 return;
682 }
683 if (!isset(self::$whiteList[$entity]))
684 {
686 $className = self::$entityClass[$entity];
687 $list = $className::getTabletFieldNames(Catalog\Model\Entity::FIELDS_ALL);
688 self::$whiteList[$entity] = (!empty($list)
689 ? array_fill_keys($list, true)
690 : []
691 );
692 }
693 if (empty(self::$whiteList[$entity]))
694 {
695 return;
696 }
697
698 $handlerExternalFields = array_diff_key($handlerFields, self::$whiteList[$entity]);
699 if (!empty($handlerExternalFields))
700 $handlerFields = array_intersect_key($handlerFields, self::$whiteList[$entity]);
701
702 foreach ($fields as $key => $value)
703 {
704 if (!array_key_exists($key, $handlerFields))
705 {
706 $unsetFields[] = $key;
707 }
708 else
709 {
710 if (!is_array($value))
711 {
712 if ($value !== $handlerFields[$key])
713 $modifyFields[$key] = $handlerFields[$key];
714 }
715 unset($handlerFields[$key]);
716 }
717 }
718 if (!empty($handlerFields))
719 $modifyFields = $modifyFields + $handlerFields;
720
721 foreach ($externalFields as $key => $value)
722 {
723 if (!array_key_exists($key, $handlerExternalFields))
724 {
725 $unsetExternalFields[] = $key;
726 }
727 else
728 {
729 //TODO: add array check
730 if (!is_array($value))
731 {
732 if ($value !== $handlerExternalFields[$key])
733 $modifyExternalFields[$key] = $handlerExternalFields[$key];
734 }
735 unset($handlerExternalFields[$key]);
736 }
737 }
738 if (!empty($handlerExternalFields))
739 $modifyExternalFields = $modifyExternalFields + $handlerExternalFields;
740
741 if (!empty($unsetFields))
742 $result->unsetFields($unsetFields);
743 if (!empty($modifyFields))
744 $result->modifyFields($modifyFields);
745 if (!empty($unsetExternalFields))
746 $result->unsetExternalFields($unsetExternalFields);
747 if (!empty($modifyExternalFields))
748 $result->modifyExternalFields($modifyExternalFields);
749 unset($modifyFields, $unsetFields);
750 }
751}
static handlerPriceOnBeforeDelete(Catalog\Model\Event $event)
static handlerPriceOnBeforeAdd(Catalog\Model\Event $event)
static handlerProductOnAfterAdd(Catalog\Model\Event $event)
static handlerPriceOnAfterDelete(Catalog\Model\Event $event)
static handlerProductOnBeforeAdd(Catalog\Model\Event $event)
static handlerPriceOnBeforeUpdate(Catalog\Model\Event $event)
static handlerPriceOnAfterAdd(Catalog\Model\Event $event)
static handlerProductOnAfterUpdate(Catalog\Model\Event $event)
static handlerProductOnBeforeUpdate(Catalog\Model\Event $event)
static handlerPriceOnAfterUpdate(Catalog\Model\Event $event)
static loadMessages($file)
Definition loc.php:64
static getMessage($code, $replace=null, $language=null)
Definition loc.php:29