1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
statapp.php
См. документацию.
1
<?php
2
namespace
Bitrix\Rest;
3
4
use Bitrix\Main,
5
Bitrix\Main\Localization\Loc;
6
Loc::loadMessages(__FILE__);
7
33
34
class
StatAppTable
extends
Main\Entity\DataManager
35
{
41
public
static
function
getTableName
()
42
{
43
return
'b_rest_stat_app'
;
44
}
45
51
public
static
function
getMap
()
52
{
53
return
array
(
54
'APP_ID'
=>
array
(
55
'data_type'
=>
'integer'
,
56
'primary'
=>
true
,
57
'title'
=> Loc::getMessage(
'STAT_APP_ENTITY_APP_ID_FIELD'
),
58
),
59
'APP_CODE'
=>
array
(
60
'data_type'
=>
'string'
,
61
'required'
=>
true
,
62
'validation'
=>
array
(__CLASS__,
'validateAppCode'
),
63
'title'
=> Loc::getMessage(
'STAT_APP_ENTITY_APP_CODE_FIELD'
),
64
),
65
'APP'
=>
array
(
66
'data_type'
=>
'Bitrix\Rest\App'
,
67
'reference'
=>
array
(
'=this.APP_ID'
=>
'ref.ID'
),
68
),
69
);
70
}
71
76
public
static
function
validateAppCode
()
77
{
78
return
array
(
79
new
Main
\
Entity
\Validator\Length(
null
, 128),
80
);
81
}
82
87
public
static
function
register
($appInfo)
88
{
89
$connection
=
Main\Application::getConnection
();
90
$helper =
$connection
->getSqlHelper();
91
$queries = $helper->prepareMerge(
92
static::getTableName(),
93
array
(
'APP_ID'
),
94
array
(
'APP_ID'
=> $appInfo[
'ID'
],
'APP_CODE'
=> $appInfo[
'CODE'
]),
95
array
(
'APP_CODE'
=> $appInfo[
'CODE'
])
96
);
97
foreach
($queries as
$query
)
98
{
99
$connection
->queryExecute(
$query
);
100
}
101
}
102
}
$connection
$connection
Определения
actionsdefinitions.php:38
Bitrix\Main\Application\getConnection
static getConnection($name="")
Определения
application.php:638
Bitrix\Rest\StatAppTable
Определения
statapp.php:35
Bitrix\Rest\StatAppTable\getMap
static getMap()
Определения
statapp.php:51
Bitrix\Rest\StatAppTable\validateAppCode
static validateAppCode()
Определения
statapp.php:76
Bitrix\Rest\StatAppTable\getTableName
static getTableName()
Определения
statapp.php:41
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
$query
$query
Определения
get_search.php:11
Bitrix\Main\Entity
Определения
ufield.php:9
Bitrix\Main
bitrix
modules
rest
lib
statapp.php
Создано системой
1.14.0