1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
iblock.php
См. документацию.
1<?php
7namespace Bitrix\Iblock\Template\Entity;
8
9class Iblock extends Base
10{
11 protected $catalog = null;
12
16 public function __construct($id)
17 {
18 parent::__construct($id);
19 $this->fieldMap = array(
20 "name" => "NAME",
21 "previewtext" => "DESCRIPTION",
22 "detailtext" => "DESCRIPTION",
23 "code" => "CODE",
24 );
25 }
26
34 public function resolve($entity)
35 {
36 if ($entity === "catalog")
37 {
38 if (!$this->catalog && $this->loadFromDatabase())
39 {
40 if (\Bitrix\Main\Loader::includeModule('catalog'))
41 $this->catalog = ElementCatalog::getInstance(0);
42 }
43
44 if ($this->catalog)
45 return $this->catalog;
46 }
47 return parent::resolve($entity);
48 }
49
56 protected function loadFromDatabase()
57 {
58 if (!isset($this->fields))
59 {
61 "select" => array_values($this->fieldMap),
62 "filter" => array("=ID" => $this->id),
63 ));
64 $this->fields = $elementList->fetch();
65 }
66 return is_array($this->fields);
67 }
68}
resolve($entity)
Определения iblock.php:34
static includeModule($moduleName)
Определения loader.php:67
static getList(array $parameters=array())
Определения datamanager.php:431
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$entity
$catalog
Определения iblock_catalog_edit.php:135