component.php 598 Bytes
<?
use \Cpeople\Classes\Block;

//if ($this->StartResultCache(COMPONENTS_CACHE_TTL))
{
    $items = Block\Getter::instance()
        ->setFilter(array('IBLOCK_ID' => $arParams['IBLOCK_ID'], 'ACTIVE' => 'Y'))
        ->setOrder(array('SORT' => 'ASC', 'NAME' => 'ASC'))
        ->get();

    $arResult['RESULT'] = array();

    foreach($items as $item) {
        $arResult['RESULT'][] = array(
            $item->NAME,
            $item->getUrl(),
        );
    }

//    $this->SetResultCacheKeys(array('RESULT'));
//    $this->endResultCache();
}

return $arResult['RESULT'];