1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
catalogstore.php
См. документацию.
1<?php
7namespace Bitrix\Iblock\Template\Entity;
8
9class 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}
static includeModule($moduleName)
Определения loader.php:67
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$entity
$fields
Определения yandex_run.php:501