コード例 #1
0
ファイル: HlBlockFinder.php プロジェクト: bitrix-expert/tools
 /**
  * @inheritdoc
  */
 protected function getItems($shard)
 {
     $items = [];
     $dbHlBlocks = HighloadBlockTable::query()->setSelect(['NAME', 'ID'])->exec();
     while ($hlBlock = $dbHlBlocks->fetch()) {
         $items[$hlBlock['NAME']] = $hlBlock['ID'];
     }
     if (empty($items)) {
         throw new ValueNotFoundException('HlBlock', 'ID #' . $this->id);
     }
     $this->registerCacheTag(static::$cacheTag);
     return $items;
 }