Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
eventspool.php
1<?php
2namespace Bitrix\Sale;
3
5{
6 protected static $events = array();
7
8
9 public static function getEvents(Order $order)
10 {
11 if (isset(static::$events[$order->getInternalId()]))
12 {
13 return static::$events[$order->getInternalId()];
14 }
15
16 return null;
17 }
18
24 public static function addEvent(Order $order, $type, $event)
25 {
26 static::$events[$order->getInternalId()][$type] = $event;
27 }
28
32 public static function resetEvents(Order $order = null)
33 {
34 if ($order !== null)
35 {
36 unset(static::$events[$order->getInternalId()]);
37 }
38 else
39 {
40 static::$events = array();
41 }
42 }
43}
static resetEvents(Order $order=null)
static addEvent(Order $order, $type, $event)
static getEvents(Order $order)
Definition eventspool.php:9