1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
log.php
См. документацию.
1
<?
2
namespace
Bitrix\Main\Composite\Debug\Model
;
3
4
use
Bitrix\Main
;
5
use
Bitrix\Main\Application
;
6
use
Bitrix\Main\Composite\Debug\Logger
;
7
use
Bitrix\Main\Localization\Loc
;
8
use
Bitrix\Main\Type\DateTime
;
9
10
Loc::loadMessages(__FILE__);
11
43
class
LogTable
extends
Main\Entity\DataManager
44
{
50
public
static
function
getTableName
()
51
{
52
return
"b_composite_log"
;
53
}
54
60
public
static
function
getMap
()
61
{
62
return
array
(
63
"ID"
=>
array
(
64
"data_type"
=>
"integer"
,
65
"primary"
=>
true
,
66
"autocomplete"
=>
true
,
67
"title"
=>
"ID"
68
),
69
"HOST"
=>
array
(
70
"data_type"
=>
"string"
,
71
"required"
=>
true
,
72
"validation"
=>
array
(__CLASS__,
"validateHost"
),
73
"title"
=> Loc::getMessage(
"LOG_ENTITY_HOST_FIELD"
)
74
),
75
"URI"
=>
array
(
76
"data_type"
=>
"string"
,
77
"required"
=>
true
,
78
"validation"
=>
array
(__CLASS__,
"validateUri"
),
79
"title"
=> Loc::getMessage(
"LOG_ENTITY_URI_FIELD"
)
80
),
81
"TITLE"
=>
array
(
82
"data_type"
=>
"string"
,
83
"validation"
=>
array
(__CLASS__,
"validateTitle"
),
84
"title"
=> Loc::getMessage(
"LOG_ENTITY_TITLE_FIELD"
)
85
),
86
"CREATED"
=>
array
(
87
"data_type"
=>
"datetime"
,
88
"required"
=>
true
,
89
"default_value"
=>
new
DateTime
(),
90
"title"
=> Loc::getMessage(
"LOG_ENTITY_CREATED_FIELD"
),
91
),
92
"TYPE"
=>
array
(
93
"data_type"
=>
"enum"
,
94
"required"
=>
true
,
95
"values"
=>
Logger::getTypes
(),
96
"default_value"
=>
Logger::TYPE_MESSAGE
,
97
"title"
=> Loc::getMessage(
"LOG_ENTITY_TYPE_FIELD"
),
98
),
99
"MESSAGE"
=>
array
(
100
"data_type"
=>
"text"
,
101
"title"
=> Loc::getMessage(
"LOG_ENTITY_MESSAGE_FIELD"
),
102
),
103
"MESSAGE_SHORT"
=>
array
(
104
"data_type"
=>
"text"
,
105
"expression"
=>
array
(
106
"case when %s = '"
.
Logger::TYPE_CACHE_REWRITING
.
"' then NULL else %s end"
,
107
"TYPE"
,
"MESSAGE"
108
),
109
"title"
=> Loc::getMessage(
"LOG_ENTITY_MESSAGE_FIELD"
),
110
),
111
112
"AJAX"
=>
array
(
113
"data_type"
=>
"boolean"
,
114
"values"
=>
array
(
"N"
,
"Y"
),
115
"title"
=> Loc::getMessage(
"LOG_ENTITY_AJAX_FIELD"
),
116
),
117
"USER_ID"
=>
array
(
118
"data_type"
=>
"integer"
,
119
"required"
=>
true
,
120
"default_value"
=> 0,
121
"title"
=> Loc::getMessage(
"LOG_ENTITY_USER_ID_FIELD"
),
122
),
123
124
"USER"
=>
array
(
125
"data_type"
=>
"\\Bitrix\\Main\\UserTable"
,
126
"reference"
=>
array
(
127
"=this.USER_ID"
=>
"ref.ID"
128
),
129
"join_type"
=>
"LEFT"
,
130
),
131
132
"PAGE_ID"
=>
array
(
133
"data_type"
=>
"integer"
,
134
"required"
=>
true
,
135
"default_value"
=> 0,
136
"title"
=> Loc::getMessage(
"LOG_ENTITY_PAGE_ID_FIELD"
),
137
),
138
);
139
}
140
145
public
static
function
validateHost
()
146
{
147
return
array
(
148
new
Main
\
Entity
\Validator\Length(
null
, 100),
149
);
150
}
151
157
public
static
function
validateUri
()
158
{
159
return
array
(
160
new
Main
\
Entity
\Validator\Length(
null
, 2000),
161
);
162
}
163
169
public
static
function
validateTitle
()
170
{
171
return
array
(
172
new
Main
\
Entity
\Validator\Length(
null
, 250),
173
);
174
}
175
179
public
static
function
deleteAll
()
180
{
181
$tableName = static::getTableName();
182
$connection
=
Application::getConnection
();
183
$connection
->queryExecute(
"DELETE FROM {$tableName}"
);
184
}
185
}
$connection
$connection
Определения
actionsdefinitions.php:38
Bitrix\Main\Application
Определения
application.php:30
Bitrix\Main\Application\getConnection
static getConnection($name="")
Определения
application.php:638
Bitrix\Main\Composite\Debug\Logger
Определения
logger.php:11
Bitrix\Main\Composite\Debug\Logger\TYPE_MESSAGE
const TYPE_MESSAGE
Определения
logger.php:37
Bitrix\Main\Composite\Debug\Logger\getTypes
static getTypes()
Определения
logger.php:114
Bitrix\Main\Composite\Debug\Logger\TYPE_CACHE_REWRITING
const TYPE_CACHE_REWRITING
Определения
logger.php:12
Bitrix\Main\Composite\Debug\Model\LogTable
Определения
log.php:44
Bitrix\Main\Composite\Debug\Model\LogTable\getMap
static getMap()
Определения
log.php:60
Bitrix\Main\Composite\Debug\Model\LogTable\validateUri
static validateUri()
Определения
log.php:157
Bitrix\Main\Composite\Debug\Model\LogTable\validateHost
static validateHost()
Определения
log.php:145
Bitrix\Main\Composite\Debug\Model\LogTable\validateTitle
static validateTitle()
Определения
log.php:169
Bitrix\Main\Composite\Debug\Model\LogTable\deleteAll
static deleteAll()
Определения
log.php:179
Bitrix\Main\Composite\Debug\Model\LogTable\getTableName
static getTableName()
Определения
log.php:50
Bitrix\Main\Localization\Loc
Определения
loc.php:12
Bitrix\Main\Type\DateTime
Определения
datetime.php:9
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
Bitrix\Main\Composite\Debug\Model
Определения
log.php:2
Bitrix\Main\Entity
Определения
ufield.php:9
Bitrix\Main
bitrix
modules
main
lib
composite
debug
model
log.php
Создано системой
1.14.0