Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
lettersegment.php
1<?php
9
13
14Loc::loadMessages(__FILE__);
15
33class LetterSegmentTable extends Entity\DataManager
34{
40 public static function getTableName()
41 {
42 return 'b_sender_mailing_chain_group';
43 }
44
50 public static function getMap()
51 {
52 return array(
53 'LETTER_ID' => array(
54 'data_type' => 'integer',
55 'primary' => true,
56 'column_name' => 'CHAIN_ID',
57 ),
58 'SEGMENT_ID' => array(
59 'data_type' => 'integer',
60 'primary' => true,
61 'column_name' => 'GROUP_ID',
62 ),
63 'INCLUDE' => array(
64 'data_type' => 'boolean',
65 'values' => array(false, true),
66 'required' => true,
67 ),
68 'LETTER' => array(
69 'data_type' => 'Bitrix\Sender\MailingChainTable',
70 'reference' => array('=this.LETTER_ID' => 'ref.ID'),
71 ),
72 'SEGMENT' => array(
73 'data_type' => 'Bitrix\Sender\GroupTable',
74 'reference' => array('=this.SEGMENT_ID' => 'ref.ID'),
75 ),
76 );
77 }
78
79
87 public static function deleteList(array $filter)
88 {
89 $entity = static::getEntity();
90 $connection = $entity->getConnection();
91
92 \CTimeZone::disable();
93 $sql = sprintf(
94 'DELETE FROM %s WHERE %s',
95 $connection->getSqlHelper()->quote($entity->getDbTableName()),
96 Query::buildFilterSql($entity, $filter)
97 );
98 $res = $connection->query($sql);
99 \CTimeZone::enable();
100
101 return $res;
102 }
103}
static loadMessages($file)
Definition loc.php:64