Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
fuser.php
1
<?php
8
namespace
Bitrix\Sale\Internals
;
9
10
use
Bitrix\Main
;
11
use
Bitrix\Main\Localization\Loc
;
12
13
Loc::loadMessages
(__FILE__);
14
31
class
FuserTable
extends
Main\Entity\DataManager
32
{
38
public
static
function
getTableName
()
39
{
40
return
'b_sale_fuser'
;
41
}
42
48
public
static
function
getMap
()
49
{
50
global $DB;
51
52
return
array(
53
'ID'
=> array(
54
'data_type'
=>
'integer'
,
55
'primary'
=>
true
,
56
'autocomplete'
=>
true
,
57
),
58
'DATE_INSERT'
=> array(
59
'data_type'
=>
'datetime'
60
),
61
'DATE_INS'
=> array(
62
'data_type'
=>
'datetime'
,
63
'expression'
=> array(
64
$DB->DatetimeToDateFunction(
'%s'
),
'DATE_INSERT'
65
)
66
),
67
'DATE_UPDATE'
=> array(
68
'data_type'
=>
'datetime'
69
),
70
'DATE_UPD'
=> array(
71
'data_type'
=>
'datetime'
,
72
'expression'
=> array(
73
$DB->DatetimeToDateFunction(
'%s'
),
'DATE_UPDATE'
74
)
75
),
76
new
Main\
Entity
\
IntegerField
(
77
"USER_ID"
78
),
79
80
'USER'
=> array(
81
'data_type'
=>
'Bitrix\Main\User'
,
82
'reference'
=> array(
'=this.USER_ID'
=>
'ref.ID'
)
83
),
84
85
new
Main\
Entity
\
StringField
(
86
'CODE'
,
87
array(
88
'size'
=> 32
89
)),
90
);
91
}
92
100
public
static
function
getUserById
($id)
101
{
102
$id = (int)$id;
103
if
($id <= 0)
104
return
false
;
105
$fuserIterator = self::getList(array(
106
'select'
=> array(
'USER_ID'
),
107
'filter'
=> array(
'=ID'
=> $id)
108
));
109
if
($fuser = $fuserIterator->fetch())
110
return
(
int
)$fuser[
'USER_ID'
];
111
return
false
;
112
}
113
}
Bitrix\Catalog\Model\Entity
Definition
entity.php:12
Bitrix\Main\Localization\Loc
Definition
loc.php:11
Bitrix\Main\Localization\Loc\loadMessages
static loadMessages($file)
Definition
loc.php:64
Bitrix\Main\ORM\Fields\IntegerField
Definition
integerfield.php:20
Bitrix\Main\ORM\Fields\StringField
Definition
stringfield.php:20
Bitrix\Sale\Internals\FuserTable
Definition
fuser.php:32
Bitrix\Sale\Internals\FuserTable\getMap
static getMap()
Definition
fuser.php:48
Bitrix\Sale\Internals\FuserTable\getUserById
static getUserById($id)
Definition
fuser.php:100
Bitrix\Sale\Internals\FuserTable\getTableName
static getTableName()
Definition
fuser.php:38
Bitrix\Main
Bitrix\Sale\Internals
Definition
accountnumber.php:3
modules
sale
lib
internals
fuser.php
Создано системой
1.10.0