Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
mailing.php
1<?php
8namespace Bitrix\Sender;
9
15
17
18Loc::loadMessages(__FILE__);
19
21{
25 public static function getTableName()
26 {
27 return 'b_sender_mailing';
28 }
29
33 public static function getMap()
34 {
35 return array(
36 'ID' => array(
37 'data_type' => 'integer',
38 'primary' => true,
39 'autocomplete' => true,
40 ),
41 'NAME' => array(
42 'data_type' => 'string',
43 'required' => true,
44 'title' => Loc::getMessage('SENDER_ENTITY_MAILING_FIELD_TITLE_NAME')
45 ),
46 'DESCRIPTION' => array(
47 'data_type' => 'string',
48 'title' => Loc::getMessage('SENDER_ENTITY_MAILING_FIELD_TITLE_DESCRIPTION'),
49 'validation' => array(__CLASS__, 'validateDescription'),
50 ),
51 'DATE_INSERT' => array(
52 'data_type' => 'datetime',
53 'required' => true,
54 'default_value' => new MainType\DateTime(),
55 ),
56 'ACTIVE' => array(
57 'data_type' => 'string',
58 'default_value' => 'Y'
59 ),
60 'TRACK_CLICK' => array(
61 'data_type' => 'string',
62 'default_value' => 'N',
63 ),
64 'IS_PUBLIC' => array(
65 'data_type' => 'string',
66 'default_value' => 'Y',
67 ),
68 'IS_TRIGGER' => array(
69 'data_type' => 'string',
70 'required' => true,
71 'default_value' => 'N',
72 ),
73 'SORT' => array(
74 'data_type' => 'integer',
75 'required' => true,
76 'default_value' => 100,
77 'title' => Loc::getMessage('SENDER_ENTITY_MAILING_FIELD_TITLE_SORT')
78 ),
79 'SITE_ID' => array(
80 'data_type' => 'string',
81 'required' => true,
82 'default_value' => SITE_ID
83 ),
84 'TRIGGER_FIELDS' => array(
85 'data_type' => 'text',
86 'serialized' => true
87 ),
88 'EMAIL_FROM' => array(
89 'data_type' => 'string',
90 'required' => false,
91 'title' => Loc::getMessage('SENDER_ENTITY_MAILING_FIELD_TITLE_EMAIL_FROM'),
92 'validation' => array('Bitrix\Sender\MailingChainTable', 'validateEmailForm'),
93 ),
94 'CHAIN' => array(
95 'data_type' => 'Bitrix\Sender\MailingChainTable',
96 'reference' => array('=this.ID' => 'ref.MAILING_ID'),
97 ),
98 'POSTING' => array(
99 'data_type' => 'Bitrix\Sender\PostingTable',
100 'reference' => array('=this.ID' => 'ref.MAILING_ID'),
101 ),
102 'MAILING_GROUP' => array(
103 'data_type' => 'Bitrix\Sender\MailingGroupTable',
104 'reference' => array('=this.ID' => 'ref.MAILING_ID'),
105 ),
106 'MAILING_SUBSCRIPTION' => array(
107 'data_type' => 'Bitrix\Sender\MailingSubscriptionTable',
108 'reference' => array('=this.ID' => 'ref.MAILING_ID'),
109 ),
110 'SUBSCRIBER' => array(
111 'data_type' => 'Bitrix\Sender\MailingSubscriptionTable',
112 'reference' => array('=this.ID' => 'ref.MAILING_ID', 'ref.IS_UNSUB' => new SqlExpression('?', 'N')),
113 ),
114 'SITE' => array(
115 'data_type' => 'Bitrix\Main\SiteTable',
116 'reference' => array('=this.SITE_ID' => 'ref.LID'),
117 ),
118 );
119 }
120
126 public static function validateDescription()
127 {
128 return array(
129 new Entity\Validator\Length(null, 2000),
130 );
131 }
132
133
138 public static function onAfterUpdate(Entity\Event $event)
139 {
140 $result = new Entity\EventResult;
141 $data = $event->getParameters();
142
143 if(array_key_exists('ACTIVE', $data['fields']))
144 {
145 if ($data['fields']['ACTIVE'] === 'Y')
146 {
147 $chain = (new \Bitrix\Sender\Entity\Chain())->load($data['primary']['ID']);
148 foreach ($chain->getList() as $letter)
149 {
150 if (!$letter->getState()->wasStartedSending())
151 {
152 $letter->wait();
153 }
154 }
155 }
156
157 Runtime\Job::actualizeByCampaignId($data['primary']['ID']);
158 }
159
160 if (array_key_exists('ACTIVE', $data['fields']) || array_key_exists('TRIGGER_FIELDS', $data['fields']))
161 {
162 static::updateChainTrigger($data['primary']['ID']);
163 }
164
165 return $result;
166 }
167
172 public static function onAfterDelete(Entity\Event $event)
173 {
174 $result = new Entity\EventResult;
175 $data = $event->getParameters();
176
177 $primary = array('MAILING_ID' => $data['primary']['ID']);
181 PostingTable::deleteList($primary);
182
183 return $result;
184 }
185
186 /*
187 *
188 * @return \Bitrix\Main\DB\Result
189 * */
190 public static function getPresetMailingList(array $params = null)
191 {
192 $resultList = array();
193 $event = new \Bitrix\Main\Event('sender', 'OnPresetMailingList');
194 $event->send();
195
196 foreach ($event->getResults() as $eventResult)
197 {
198 if ($eventResult->getModuleId() === 'sale')
199 {
200 continue;
201 }
202
203 if ($eventResult->getType() == \Bitrix\Main\EventResult::ERROR)
204 {
205 continue;
206 }
207
208 $eventResultParameters = $eventResult->getParameters();
209
210 if (!empty($eventResultParameters))
211 {
212 if(!empty($params['CODE']))
213 {
214 $eventResultParametersTmp = array();
215 foreach($eventResultParameters as $preset)
216 {
217 if($params['CODE'] == $preset['CODE'])
218 {
219 $eventResultParametersTmp[] = $preset;
220 break;
221 }
222 }
223
224 $eventResultParameters = $eventResultParametersTmp;
225 }
226
227 $resultList = array_merge($resultList, $eventResultParameters);
228 }
229 }
230
231 $resultListTmp = Integration\EventHandler::onSenderTriggerCampaignPreset();
232 foreach($resultList as $result)
233 {
234 if(empty($result['TRIGGER']['START']['ENDPOINT']['CODE']))
235 continue;
236
237 $trigger = Trigger\Manager::getOnce($result['TRIGGER']['START']['ENDPOINT']);
238 if(!$trigger)
239 continue;
240
241 $result['TRIGGER']['START']['ENDPOINT']['NAME'] = $trigger->getName();
242 if(!empty($result['TRIGGER']['START']['ENDPOINT']['CODE']))
243 {
244 $trigger = Trigger\Manager::getOnce($result['TRIGGER']['END']['ENDPOINT']);
245 if(!$trigger)
246 $result['TRIGGER']['END']['ENDPOINT']['NAME'] = $trigger->getName();
247 }
248
249
250 $resultListTmp[] = $result;
251 }
252
253 return $resultListTmp;
254 }
255
256 public static function checkFieldsChain(Entity\Result $result, $primary, array $fields)
257 {
258 $id = $primary;
259 $errorList = array();
260 $errorCurrentNumber = 0;
261
262 foreach($fields as $item)
263 {
264 $errorCurrentNumber++;
265
266 $chainFields = array(
267 'MAILING_ID' => ($id ? $id : 1),
268 'ID' => $item['ID'],
269 'REITERATE' => 'Y',
270 'IS_TRIGGER' => 'Y',
271 'EMAIL_FROM' => $item['EMAIL_FROM'],
272 'SUBJECT' => $item['SUBJECT'],
273 'MESSAGE' => $item['MESSAGE'],
274 'TEMPLATE_TYPE' => $item['TEMPLATE_TYPE'],
275 'TEMPLATE_ID' => $item['TEMPLATE_ID'],
276 'TIME_SHIFT' => intval($item['TIME_SHIFT']),
277 );
278
279 $chainId = 0;
280 if(!empty($item['ID']))
281 $chainId = $item['ID'];
282
283 if($chainId > 0)
284 {
285 $chain = MailingChainTable::getRowById(array('ID' => $chainId));
286 if($chain && $chain['STATUS'] != MailingChainTable::STATUS_WAIT)
287 {
288 $chainFields['STATUS'] = $chain['STATUS'];
289 }
290 }
291
292 if(empty($chainFields['STATUS']))
293 $chainFields['STATUS'] = MailingChainTable::STATUS_WAIT;
294
295 $chainFields['ID'] = $chainId;
296
297 $resultItem = new Entity\Result;
298 MailingChainTable::checkFields($resultItem, null, $chainFields);
299 if($resultItem->isSuccess())
300 {
301
302 }
303 else
304 {
305 $errorList[$errorCurrentNumber] = $resultItem->getErrors();
306 }
307 }
308
309 $delimiter = '';
310 foreach($errorList as $number => $errors)
311 {
312 /* @var \Bitrix\Main\Entity\FieldError[] $errors*/
313 foreach($errors as $error)
314 {
315 $result->addError(new Entity\FieldError(
316 $error->getField(),
317 $delimiter . Loc::getMessage('SENDER_ENTITY_MAILING_CHAIN_ITEM_NUMBER') . $number . ': ' . $error->getMessage(),
318 $error->getCode()
319 )
320 );
321
322 $delimiter = '';
323 }
324
325 $delimiter = "\n";
326 }
327
328
329 return $result;
330 }
331
332 public static function updateChain($id, array $fields)
333 {
334 $result = new Entity\Result;
335
336 static::checkFieldsChain($result, $id, $fields);
337 if(!$result->isSuccess(true))
338 return $result;
339
340 $parentChainId = null;
341 $existChildIdList = array();
342 foreach($fields as $chainFields)
343 {
344 $chainId = $chainFields['ID'];
345 unset($chainFields['ID']);
346
347 $chainFields['MAILING_ID'] = $id;
348 $chainFields['IS_TRIGGER'] = 'Y';
349 $chainFields['REITERATE'] = 'Y';
350 $chainFields['PARENT_ID'] = $parentChainId;
351
352 // default status
353 if($chainId > 0)
354 {
355 $chain = MailingChainTable::getRowById(array('ID' => $chainId));
356 if($chain && $chain['STATUS'] != MailingChainTable::STATUS_WAIT)
357 {
358 $chainFields['STATUS'] = $chain['STATUS'];
359 unset($chainFields['CREATED_BY']);
360 }
361 }
362 if(empty($chainFields['STATUS']))
363 $chainFields['STATUS'] = MailingChainTable::STATUS_WAIT;
364
365
366 // add or update
367 if($chainId > 0)
368 {
369 $existChildIdList[] = $chainId;
370
371 $chainUpdateDb = Model\LetterTable::update($chainId, $chainFields);
372 if($chainUpdateDb->isSuccess())
373 {
374
375 }
376 else
377 {
378 $result->addErrors($chainUpdateDb->getErrors());
379 }
380 }
381 else
382 {
383 $chainAddDb = MailingChainTable::add($chainFields);
384 if($chainAddDb->isSuccess())
385 {
386 $chainId = $chainAddDb->getId();
387 $existChildIdList[] = $chainId;
388 }
389 else
390 {
391 $result->addErrors($chainAddDb->getErrors());
392 }
393 }
394
395 if(!empty($errorList)) break;
396
397 $parentChainId = null;
398 if($chainId !== null)
399 $parentChainId = $chainId;
400 }
401
402 $deleteChainDb = MailingChainTable::getList(array(
403 'select' => array('ID'),
404 'filter' => array('MAILING_ID' => $id, '!ID' => $existChildIdList),
405 ));
406 while($deleteChain = $deleteChainDb->fetch())
407 {
408 Model\LetterTable::delete($deleteChain['ID']);
409 }
410
411 static::updateChainTrigger($id);
412
413 return $result;
414 }
415
416 public static function getChain($id)
417 {
418 $result = array();
419 $parentId = null;
420
421 do
422 {
423 $chainDb = MailingChainTable::getList(array(
424 'select' => array(
425 'ID', 'SUBJECT', 'EMAIL_FROM', 'MESSAGE', 'TIME_SHIFT', 'PARENT_ID',
426 'DATE_INSERT', 'PRIORITY', 'LINK_PARAMS', 'TEMPLATE_TYPE', 'TEMPLATE_ID',
427 'CREATED_BY', 'CREATED_BY_NAME' => 'CREATED_BY_USER.NAME', 'CREATED_BY_LAST_NAME' => 'CREATED_BY_USER.LAST_NAME'
428 ),
429 'filter' => array('=MAILING_ID' => $id, '=PARENT_ID' => $parentId),
430 ));
431
432 $parentId = null;
433 while($chain = $chainDb->fetch())
434 {
435 //unset($chain['MESSAGE']);
436 $result[] = $chain;
437 $parentId = $chain['ID'];
438 }
439
440
441 }while($parentId !== null);
442
443
444 return $result;
445 }
446
447 public static function updateChainTrigger($id)
448 {
449 // get first item of chain
450 $chainDb = MailingChainTable::getList(array(
451 'select' => array('ID', 'TRIGGER_FIELDS' => 'MAILING.TRIGGER_FIELDS'),
452 'filter' => array('=MAILING_ID' => $id, '=IS_TRIGGER' => 'Y', '=PARENT_ID' => null),
453 ));
454
455 $chain = $chainDb->fetch();
456 if(!$chain) return;
457 $chainId = $chain['ID'];
458
459 // get trigger settings from mailing
460 $triggerFields = $chain['TRIGGER_FIELDS'];
461 if(!is_array($triggerFields))
462 $triggerFields = array();
463
464 // init TriggerSettings objects
465 $settingsList = array();
466 foreach($triggerFields as $key => $point)
467 {
468 if(empty($point['CODE'])) continue;
469
470 $point['IS_EVENT_OCCUR'] = true;
471 $point['IS_PREVENT_EMAIL'] = false;
472 $point['SEND_INTERVAL_UNIT'] = 'M';
473 $point['IS_CLOSED_TRIGGER'] = ($point['IS_CLOSED_TRIGGER'] == 'Y' ? true : false);
474
475 switch($key)
476 {
477 case 'END':
478 $point['IS_TYPE_START'] = false;
479 break;
480
481 case 'START':
482 default:
483 $point['IS_TYPE_START'] = true;
484 }
485
486 $settingsList[] = new Trigger\Settings($point);
487 }
488
489
490 // prepare fields for save
491 $mailingTriggerList = array();
492 foreach($settingsList as $settings)
493 {
494 /* @var \Bitrix\Sender\Trigger\Settings $settings */
495 $trigger = Trigger\Manager::getOnce($settings->getEndpoint());
496 if($trigger)
497 {
498 $triggerFindId = $trigger->getFullEventType() . "/" .((int) $settings->isTypeStart());
499 $mailingTriggerList[$triggerFindId] = array(
500 'IS_TYPE_START' => $settings->isTypeStart(),
501 'NAME' => $trigger->getName(),
502 'EVENT' => $trigger->getFullEventType(),
503 'ENDPOINT' => $settings->getArray(),
504 );
505 }
506 }
507
508
509 // add new, update exists, delete old rows
510 $triggerDb = MailingTriggerTable::getList(array(
511 'select' => array('EVENT', 'MAILING_CHAIN_ID', 'IS_TYPE_START'),
512 'filter' => array('=MAILING_CHAIN_ID' => $chainId)
513 ));
514 while($trigger = $triggerDb->fetch())
515 {
516 $triggerFindId = $trigger['EVENT'] . "/" . ((int) $trigger['IS_TYPE_START']);
517 if(!isset($mailingTriggerList[$triggerFindId]))
518 {
519 MailingTriggerTable::delete($trigger);
520 }
521 else
522 {
523 MailingTriggerTable::update($trigger, $mailingTriggerList[$triggerFindId]);
524 unset($mailingTriggerList[$triggerFindId]);
525 }
526 }
527
528 foreach($mailingTriggerList as $triggerFindId => $settings)
529 {
531 $settings['MAILING_CHAIN_ID'] = $chainId;
532 MailingTriggerTable::add($settings);
533 }
534
535 Trigger\Manager::actualizeHandlerForChild();
536 }
537
538 public static function setWasRunForOldData($id, $state)
539 {
540 $state = (bool) $state == true ? 'Y' : 'N';
541 $mailing = static::getRowById($id);
542 if(!$mailing)
543 {
544 return;
545 }
546
547 $triggerFields = $mailing['TRIGGER_FIELDS'];
548 if(!is_array($triggerFields))
549 {
550 return;
551 }
552
553 if(!isset($triggerFields['START']))
554 {
555 return;
556 }
557
558 $triggerFields['START']['WAS_RUN_FOR_OLD_DATA'] = $state;
559 $updateDb = static::update($id, array('TRIGGER_FIELDS' => $triggerFields));
560 if($updateDb->isSuccess())
561 {
562 static::updateChainTrigger($id);
563 }
564 }
565
566 public static function getPersonalizeList($id)
567 {
568 $result = array();
569
570 // fetch all connectors for getting emails
571 $groupConnectorDb = MailingGroupTable::getList(array(
572 'select' => array(
573 'CONNECTOR_ENDPOINT' => 'GROUP.GROUP_CONNECTOR.ENDPOINT',
574 'GROUP_ID'
575 ),
576 'filter' => array(
577 'MAILING_ID' => $id,
578 'INCLUDE' => true,
579 ),
580 'order' => array('GROUP_ID' => 'ASC')
581 ));
582 while($groupConnector = $groupConnectorDb->fetch())
583 {
584 $connector = null;
585 if(is_array($groupConnector['CONNECTOR_ENDPOINT']))
586 {
587 $connector = Connector\Manager::getConnector($groupConnector['CONNECTOR_ENDPOINT']);
588 }
589
590 if(!$connector)
591 {
592 continue;
593 }
594
595 $result = array_merge($result, $connector->getPersonalizeList());
596 }
597
598 return $result;
599 }
600
601 public static function getChainPersonalizeList($id)
602 {
603 $result = array();
604
605 $mailingDb = MailingTable::getList(array(
606 'select' => array('ID', 'TRIGGER_FIELDS'),
607 'filter' => array(
608 //'=ACTIVE' => 'Y',
609 '=IS_TRIGGER' => 'Y',
610 '=ID' => $id
611 ),
612 ));
613 if(!$mailing = $mailingDb->fetch())
614 return $result;
615
616 $triggerFields = $mailing['TRIGGER_FIELDS'];
617 if(!is_array($triggerFields))
618 $triggerFields = array();
619
620 $settingsList = array();
621 foreach($triggerFields as $key => $point)
622 {
623 if(empty($point['CODE'])) continue;
624
625 $point['IS_EVENT_OCCUR'] = true;
626 $point['IS_PREVENT_EMAIL'] = false;
627 $point['SEND_INTERVAL_UNIT'] = 'M';
628
629 switch($key)
630 {
631 case 'END':
632 $point['IS_TYPE_START'] = false;
633 break;
634
635 case 'START':
636 default:
637 $point['IS_TYPE_START'] = true;
638 }
639
640 $settingsList[] = new Trigger\Settings($point);
641 }
642
643 foreach($settingsList as $settings)
644 {
645 /* @var \Bitrix\Sender\Trigger\Settings $settings */
646 if(!$settings->isTypeStart())
647 continue;
648
649 $trigger = Trigger\Manager::getOnce($settings->getEndpoint());
650 if($trigger)
651 {
652 $result = array_merge($result, $trigger->getPersonalizeList());
653 }
654 }
655
656 return $result;
657 }
658
659 public static function getMailingSiteId($mailingId)
660 {
661 static $cache;
662 if (!$cache || !($cache[$mailingId] ?? false))
663 {
664 $mailing = self::getById($mailingId)->fetch();
665 $cache[$mailingId] = $mailing['SITE_ID'];
666 }
667
668 return $cache[$mailingId];
669 }
670
678 public static function deleteList(array $filter): \Bitrix\Main\DB\Result
679 {
680 $entity = static::getEntity();
681 $connection = $entity->getConnection();
682
683 \CTimeZone::disable();
684 $sql = sprintf(
685 'DELETE FROM %s WHERE %s',
686 $connection->getSqlHelper()->quote($entity->getDbTableName()),
687 Query::buildFilterSql($entity, $filter)
688 );
689 $res = $connection->query($sql);
690 \CTimeZone::enable();
691
692 return $res;
693 }
694}
695
696
698{
702 public static function getTableName()
703 {
704 return 'b_sender_mailing_group';
705 }
706
710 public static function getMap()
711 {
712 return array(
713 'MAILING_ID' => array(
714 'data_type' => 'integer',
715 'primary' => true,
716 ),
717 'GROUP_ID' => array(
718 'data_type' => 'integer',
719 'primary' => true,
720 ),
721 'INCLUDE' => array(
722 'data_type' => 'boolean',
723 'values' => array(false, true),
724 'required' => true,
725 ),
726 'MAILING' => array(
727 'data_type' => 'Bitrix\Sender\MailingTable',
728 'reference' => array('=this.MAILING_ID' => 'ref.ID'),
729 ),
730 'GROUP' => array(
731 'data_type' => 'Bitrix\Sender\GroupTable',
732 'reference' => array('=this.GROUP_ID' => 'ref.ID'),
733 ),
734 );
735 }
736
744 public static function deleteList(array $filter): \Bitrix\Main\DB\Result
745 {
746 $entity = static::getEntity();
747 $connection = $entity->getConnection();
748
749 \CTimeZone::disable();
750 $sql = sprintf(
751 'DELETE FROM %s WHERE %s',
752 $connection->getSqlHelper()->quote($entity->getDbTableName()),
753 Query::buildFilterSql($entity, $filter)
754 );
755 $res = $connection->query($sql);
756 \CTimeZone::enable();
757
758 return $res;
759 }
760}
761
779{
783 public static function getTableName()
784 {
785 return 'b_sender_mailing_subscription';
786 }
787
791 public static function getMap()
792 {
793 return array(
794 'MAILING_ID' => array(
795 'data_type' => 'integer',
796 'primary' => true,
797 ),
798 'CONTACT_ID' => array(
799 'data_type' => 'integer',
800 'primary' => true,
801 ),
802 'DATE_INSERT' => array(
803 'data_type' => 'datetime',
804 'default_value' => new MainType\DateTime(),
805 ),
806 'IS_UNSUB' => array(
807 'data_type' => 'string',
808 ),
809 'MAILING' => array(
810 'data_type' => 'Bitrix\Sender\MailingTable',
811 'reference' => array('=this.MAILING_ID' => 'ref.ID'),
812 ),
813 'CONTACT' => array(
814 'data_type' => 'Bitrix\Sender\ContactTable',
815 'reference' => array('=this.CONTACT_ID' => 'ref.ID'),
816 ),
817 );
818 }
819
826 public static function getSubscriptionList(array $parameters = array())
827 {
828 $parameters['filter'] = array('=IS_UNSUB' => 'N') + (!isset($parameters['filter']) ? array() : $parameters['filter']);
829 return parent::getList($parameters);
830 }
831
838 public static function getUnSubscriptionList(array $parameters = array())
839 {
840 $parameters['filter'] = array('=IS_UNSUB' => 'Y') + (!isset($parameters['filter']) ? array() : $parameters['filter']);
841 return parent::getList($parameters);
842 }
843
844
851 public static function addSubscription(array $parameters = array())
852 {
853 $primary = array('MAILING_ID' => $parameters['MAILING_ID'], 'CONTACT_ID' => $parameters['CONTACT_ID']);
854 $fields = array('IS_UNSUB' => 'N');
855 $row = static::getRowById($primary);
856 if($row)
857 {
858 $result = static::update($primary, array('IS_UNSUB' => 'N'));
859 }
860 else
861 {
862 $result = static::add($fields + $parameters);
863 }
864
865 return $result->isSuccess();
866 }
867
874 public static function addUnSubscription(array $parameters = array())
875 {
876 $primary = array('MAILING_ID' => $parameters['MAILING_ID'], 'CONTACT_ID' => $parameters['CONTACT_ID']);
877 $fields = array('IS_UNSUB' => 'Y');
878 $row = static::getRowById($primary);
879 if($row)
880 {
881 $result = static::update($primary, $fields);
882 }
883 else
884 {
885 $result = static::add($fields + $parameters);
886 }
887
888 return $result->isSuccess();
889 }
890
891
899 public static function deleteList(array $filter): \Bitrix\Main\DB\Result
900 {
901 $entity = static::getEntity();
902 $connection = $entity->getConnection();
903
904 \CTimeZone::disable();
905 $sql = sprintf(
906 'DELETE FROM %s WHERE %s',
907 $connection->getSqlHelper()->quote($entity->getDbTableName()),
908 Query::buildFilterSql($entity, $filter)
909 );
910 $res = $connection->query($sql);
911 \CTimeZone::enable();
912
913 return $res;
914 }
915}
static loadMessages($file)
Definition loc.php:64
static getMessage($code, $replace=null, $language=null)
Definition loc.php:29
static deleteList(array $filter)
static deleteList(array $filter)
Definition mailing.php:744
static addUnSubscription(array $parameters=array())
Definition mailing.php:874
static getSubscriptionList(array $parameters=array())
Definition mailing.php:826
static deleteList(array $filter)
Definition mailing.php:899
static addSubscription(array $parameters=array())
Definition mailing.php:851
static getUnSubscriptionList(array $parameters=array())
Definition mailing.php:838
static getPersonalizeList($id)
Definition mailing.php:566
static updateChain($id, array $fields)
Definition mailing.php:332
static deleteList(array $filter)
Definition mailing.php:678
static getMailingSiteId($mailingId)
Definition mailing.php:659
static getPresetMailingList(array $params=null)
Definition mailing.php:190
static setWasRunForOldData($id, $state)
Definition mailing.php:538
static onAfterUpdate(Entity\Event $event)
Definition mailing.php:138
static checkFieldsChain(Entity\Result $result, $primary, array $fields)
Definition mailing.php:256
static onAfterDelete(Entity\Event $event)
Definition mailing.php:172
static getChainPersonalizeList($id)
Definition mailing.php:601
static deleteList(array $filter)
Definition posting.php:338