- Модуль: iblock
- Путь к файлу: ~/bitrix/modules/iblock/lib/inheritedproperty/basetemplate.php
- Класс: BitrixIblockInheritedPropertyBaseTemplate
- Вызов: BaseTemplate::get
public function get(BaseValues $entity = null)
{
static $cache = array();
if ($entity === null)
$entity = $this->entity;
$filter = array(
"=IBLOCK_ID" => $entity->getIblockId(),
"=ENTITY_TYPE" => $entity->getType(),
"=ENTITY_ID" => $entity->getId(),
);
$cacheKey = implode('|', $filter);
if (!isset($cache[$cacheKey]))
{
$result = array();
$templateList = BitrixIblockInheritedPropertyTable::getList(array(
"select" => array("ID", "CODE", "TEMPLATE", "ENTITY_TYPE", "ENTITY_ID"),
"filter" => $filter,
));
while ($row = $templateList->fetch())
{
$result[$row["CODE"]] = $row;
}
$cache[$cacheKey] = $result;
}
return $cache[$cacheKey];
}