18 private static $processing =
false;
22 if (self::$processing)
24 return self::getAgentName();
27 self::$processing =
true;
32 self::$processing =
false;
40 private static function getAgentName(): string
42 return self::class .
"::execute();";
45 private function __construct()
54 private function run(): string
56 $types = $this->getTypes();
62 $logIds = $this->getLogIds($types);
68 foreach ($logIds as $logId)
70 \CSocNetLog::Delete($logId);
73 return self::getAgentName();
83 private function getLogIds(array $types): array
88 '@ENTITY_TYPE' => $types,
90 'limit' => self::LIMIT,
91 'order' => [
'ID' =>
'ASC'],
98 return array_column($logIds,
'ID');
105 private function getTypes(): array
107 if (!Loader::includeModule(
'crm'))
113 SONET_CRM_LEAD_ENTITY,
114 SONET_CRM_CONTACT_ENTITY,
115 SONET_CRM_COMPANY_ENTITY,
116 SONET_CRM_DEAL_ENTITY,
117 SONET_CRM_ACTIVITY_ENTITY,
118 SONET_CRM_INVOICE_ENTITY,
119 SONET_CRM_ORDER_ENTITY,
120 SONET_CRM_SUSPENDED_LEAD_ENTITY,
121 SONET_SUSPENDED_CRM_CONTACT_ENTITY,
122 SONET_SUSPENDED_CRM_COMPANY_ENTITY,
123 SONET_CRM_SUSPENDED_DEAL_ENTITY,
124 SONET_CRM_SUSPENDED_ACTIVITY_ENTITY,
static getList(array $parameters=array())