...Человеческий поиск в разработке...
- Модуль: crm
- Путь к файлу: ~/bitrix/modules/crm/lib/entitypreset.php
- Класс: Bitrix\Crm\EntityPreset
- Вызов: EntityPreset::getActiveItemList
static function getActiveItemList() { $results = []; if (isset(static::$staticCache[static::CACHE_ID_ACTIVE_ITEM_LIST])) { $results = static::$staticCache[static::CACHE_ID_ACTIVE_ITEM_LIST]; } else { $cache = Cache::createInstance(); if ( $cache->initCache( static::CACHE_TTL, static::CACHE_ID_ACTIVE_ITEM_LIST, static::CACHE_PATH ) ) { $results = $cache->getVars(); } elseif ($cache->startDataCache()) { $entity = self::getSingleInstance(); $dbResult = $entity->getList( array( 'order' => array('SORT' => 'ASC', 'ID' => 'ASC'), 'filter' => self::getActivePresetFilter(), 'select' => array('ID', 'NAME') ) ); $results = []; while ($fields = $dbResult->fetch()) { $results[$fields['ID']] = $fields['NAME']; } $cache->endDataCache($results); } static::$staticCache[static::CACHE_ID_ACTIVE_ITEM_LIST] = $results; } return $results; }