Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
mailentityoptions.php
1
<?php
2
3
namespace
Bitrix\Mail\Internals
;
4
5
use
Bitrix\Main\Entity
;
6
use
Bitrix\Main\ORM
;
7
24
class
MailEntityOptionsTable
extends
Entity\DataManager
25
{
26
const
DIR
=
'DIR'
;
27
const
MAILBOX
=
'MAILBOX'
;
28
const
MESSAGE
=
'MESSAGE'
;
29
30
public
static
function
add
($fields)
31
{
32
try
{
33
return
parent::add($fields);
34
}
catch
(\Exception $exception)
35
{
36
//key conflict
37
}
38
}
39
40
public
static
function
deleteList
(array $filter)
41
{
42
$entity
= static::getEntity();
43
$connection =
$entity
->getConnection();
44
45
return
$connection->query(sprintf(
46
'DELETE FROM %s WHERE %s'
,
47
$connection->getSqlHelper()->quote(
$entity
->getDbTableName()),
48
ORM\
Query
\Query::buildFilterSql(
$entity
, $filter)
49
));
50
}
51
52
public
static
function
getFilePath
()
53
{
54
return
__FILE__;
55
}
56
57
public
static
function
getTableName
()
58
{
59
return
'b_mail_entity_options'
;
60
}
61
62
public
static
function
getMap
()
63
{
64
return
array(
65
'MAILBOX_ID'
=> array(
66
'data_type'
=>
'integer'
,
67
'required'
=>
true
,
68
'primary'
=>
true
,
69
),
70
'ENTITY_TYPE'
=> array(
71
'data_type'
=>
'enum'
,
72
'values'
=> array(self::DIR, self::MAILBOX, self::MESSAGE),
73
'required'
=>
true
,
74
'primary'
=>
true
,
75
),
76
'ENTITY_ID'
=> array(
77
'data_type'
=>
'string'
,
78
'required'
=>
true
,
79
'primary'
=>
true
,
80
),
81
'PROPERTY_NAME'
=> array(
82
'data_type'
=>
'string'
,
83
'required'
=>
true
,
84
'primary'
=>
true
,
85
),
86
'VALUE'
=> array(
87
'data_type'
=>
'string'
,
88
),
89
'DATE_INSERT'
=> array(
90
'data_type'
=>
'datetime'
,
91
),
92
);
93
}
94
}
Bitrix\Mail\Internals\MailEntityOptionsTable
Definition
mailentityoptions.php:25
Bitrix\Mail\Internals\MailEntityOptionsTable\getMap
static getMap()
Definition
mailentityoptions.php:62
Bitrix\Mail\Internals\MailEntityOptionsTable\deleteList
static deleteList(array $filter)
Definition
mailentityoptions.php:40
Bitrix\Mail\Internals\MailEntityOptionsTable\DIR
const DIR
Definition
mailentityoptions.php:26
Bitrix\Mail\Internals\MailEntityOptionsTable\add
static add($fields)
Definition
mailentityoptions.php:30
Bitrix\Mail\Internals\MailEntityOptionsTable\getFilePath
static getFilePath()
Definition
mailentityoptions.php:52
Bitrix\Mail\Internals\MailEntityOptionsTable\MAILBOX
const MAILBOX
Definition
mailentityoptions.php:27
Bitrix\Mail\Internals\MailEntityOptionsTable\getTableName
static getTableName()
Definition
mailentityoptions.php:57
Bitrix\Mail\Internals\MailEntityOptionsTable\MESSAGE
const MESSAGE
Definition
mailentityoptions.php:28
Bitrix\Main\ORM\Data\DataManager
Definition
datamanager.php:33
Bitrix\Main\ORM\Data\DataManager\$entity
static $entity
Definition
datamanager.php:45
Bitrix\Main\ORM\Entity
Definition
entity.php:26
Bitrix\Main\ORM\Query\Query
Definition
query.php:118
Bitrix\Mail\Internals
Definition
domainemail.php:3
Bitrix\Main\ORM
modules
mail
lib
internals
mailentityoptions.php
Создано системой
1.10.0