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/rospirotorg.ru/bitrix/modules/aby.telegram/lib/ |
Upload File : |
<?php namespace Aby\Telegram; use \Aby\Telegram\Module; use \Aby\Telegram\Notification; use \Aby\Telegram\Template; use Bitrix\Main\ArgumentNullException; class Event { /** * @param $event * * @throws ArgumentNullException */ public static function IBlockElementAdd($event){ if(!$event["ID"]){ return; } (new Module())->processEvent('iblock_add', $event); } /** * @param $event * * @throws ArgumentNullException */ public static function IBlockElementUpdate($event){ (new Module())->processEvent('iblock_edit', $event); } /** * @param \Bitrix\Main\Event $event * * @throws ArgumentNullException */ public static function SaleOrderSaved(\Bitrix\Main\Event $event){ if(!$event->getParameter('IS_NEW')){ return; } (new Module())->processEvent('new_order', $event); } /** * @param $order_id * @param $val * * @throws ArgumentNullException */ public static function SalePayOrder($order_id, $val){ if($val != "Y"){ return; } (new Module())->processEvent('order_payed', array(), array("order_id" => $order_id)); } /** * @param $order_id * @param $val * * @throws ArgumentNullException */ public static function SaleStatusOrder($order_id, $val){ (new Module())->processEvent('order_status_changed', array(), array("order_id" => $order_id, "val" => $val)); } /** * @param $order_id * @param $val * @param string $description * * @throws ArgumentNullException */ public static function SaleCancelOrder($order_id, $val, $description = ''){ if($val != "Y"){ return; } (new Module())->processEvent('order_canceled', array(), array("order_id" => $order_id, "val" => $val, "description" => $description)); } /** * @param $web_form_id * @param $result_id * * @throws ArgumentNullException */ public static function FormResultAdd($web_form_id, $result_id){ (new Module())->processEvent('form_add', array(), array("web_form_id" => $web_form_id, "result_id" => $result_id)); } /** * @param $web_form_id * @param $result_id * * @throws ArgumentNullException */ public static function FormResultUpdate($web_form_id, $result_id){ (new Module())->processEvent('form_edit', array(), array("web_form_id" => $web_form_id, "result_id" => $result_id)); } /** * @param $comment_id * @param $event * * @return void * @throws ArgumentNullException */ public static function BlogCommentAdd($comment_id, $event){ (new Module())->processEvent('blog_comment_add', $event, array("comment_id" => $comment_id)); } /** * @param $event * * @throws ArgumentNullException */ public static function UserRegister($event){ if(!$event["USER_ID"]){ return; } (new Module())->processEvent('user_register', $event); } }