Server IP : 80.87.202.40 / Your IP : 216.73.216.169 Web Server : Apache System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64 User : bitrix ( 600) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/bitrix/ext_www/cvetdv.ru/bitrix/modules/sale/lib/internals/ |
Upload File : |
<?php namespace Bitrix\Sale\Internals; class EventsPool extends PoolBase { protected static $events = array(); public static function getEvents($code) { $resultList = array(); $list = parent::getPoolByCode($code); if (is_array($list) && !empty($list)) { foreach ($list as $eventName => $eventData) { $resultList[$eventName] = reset($eventData); } $list = $resultList; } return $list; } public static function getEventsByType($code, $type) { $data = parent::get($code, $type); if (!empty($data)) { $data = reset($data); } return $data; } /** * @param $code * @param $type * @param $event */ public static function addEvent($code, $type, $event) { parent::add($code, $type, $event); } /** * @param $code * @param $type * * @return bool */ public static function isEventTypeExists($code, $type) { return parent::isTypeExists($code, $type); } /** * @param null $code * @param null $type */ public static function resetEvents($code = null, $type = null) { parent::resetPool($code, $type); } }