1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
catalogstore.php
См. документацию.
1
<?php
7
namespace
Bitrix\Iblock\Template\Entity;
8
9
class
CatalogStore
extends
Base
10
{
14
public
function
__construct
($id)
15
{
16
parent::__construct($id);
17
$this->fieldMap =
array
(
18
"name"
=>
"TITLE"
,
19
//not accessible from template engine
20
"ID"
=>
"ID"
,
21
);
22
}
23
31
public
function
resolve
(
$entity
)
32
{
33
if
(intval(
$entity
) > 0)
34
{
35
if
(\
Bitrix
\
Main
\
Loader::includeModule
(
'catalog'
))
36
{
37
return
CatalogStore::getInstance(intval(
$entity
));
38
}
39
}
40
return
parent::resolve(
$entity
);
41
}
42
50
public
function
setFields
(
array
$fields
)
51
{
52
parent::setFields(
$fields
);
53
if
(
54
is_array($this->fields)
55
//&& $this->fields["MEASURE"] > 0
56
)
57
{
58
//$this->fields["MEASURE"] = new ElementCatalogMeasure($this->fields["MEASURE"]);
59
//TODO
60
}
61
}
62
69
protected
function
loadFromDatabase
()
70
{
71
if
(!isset($this->fields) && ($this->
id
> 0))
72
{
73
$storeList = \CCatalogStore::getList(
array
(),
array
(
74
"ID"
=> $this->
id
,
75
),
false
,
false
,
array
(
"ID"
,
"TITLE"
));
76
$this->fields = $storeList->fetch();
77
}
78
return
is_array($this->fields);
79
}
80
}
Bitrix\Iblock\Template\Entity\CatalogStore
Определения
catalogstore.php:10
Bitrix\Iblock\Template\Entity\CatalogStore\__construct
__construct($id)
Определения
catalogstore.php:14
Bitrix\Iblock\Template\Entity\CatalogStore\loadFromDatabase
loadFromDatabase()
Определения
catalogstore.php:69
Bitrix\Iblock\Template\Entity\CatalogStore\resolve
resolve($entity)
Определения
catalogstore.php:31
Bitrix\Iblock\Template\Entity\CatalogStore\setFields
setFields(array $fields)
Определения
catalogstore.php:50
Bitrix\Main\Loader\includeModule
static includeModule($moduleName)
Определения
loader.php:67
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
$entity
$entity
Определения
group_bizproc_workflow_delete.php:17
Bitrix\Main
Bitrix\Sale\Services\Base
Определения
concreteproductrestriction.php:3
Bitrix
$fields
$fields
Определения
yandex_run.php:501
bitrix
modules
iblock
lib
template
entity
catalogstore.php
Создано системой
1.14.0