/** * Формирует данные об основном элементе * @param Item $item Item instance * @return array Данные об элменте */ private function composeItem(Item $item) { $x = array( 'id' => $item->field('ID'), 'iblockId' => $item->field('IBLOCK_ID'), 'name' => $item->field('NAME'), 'avatar' => $item->src('PREVIEW_PICTURE', $resized = array(120, 120)), 'anounce' => $item->field('DETAIL_TEXT'), 'vk' => $item->propValue('VK'), 'fb' => $item->propValue('FB'), 'city' => $item->propValue('CITY'), 'shows' => ($item->field('SHOW_COUNTER')) ? $item->field('SHOW_COUNTER') : 0 ); $x['globalFilter'] = $this->products($x['id']); return $x; }
/** * Формирует данные об основном элементе * @param Item $item Item instance * @return array Данные об элменте */ private function composeItem(Item $item) { $x = array( 'id' => $item->field('ID'), 'iblockId' => $item->field('IBLOCK_ID'), 'section' => $item->field('IBLOCK_SECTION_ID'), 'anounce' => $item->field('PREVIEW_TEXT'), 'picture' => $item->src('PREVIEW_PICTURE'), 'name' => $item->field('NAME'), 'make' => $item->propValue('MAKE'), 'model' => $item->propValue('MODEL'), 'year' => $item->propValue('YEAR'), 'height' => $item->propValue('HEIGHT'), 'material' => $item->propValue('MATERIAL'), 'features' => $item->propValue('FEATURES'), 'price' => $item->propValue('PRICE'), 'availability' => $item->propValue('AVAILABILITY'), 'photos' => $item->propValue('PHOTOS'), 'shopLink' => $item->propValue('SHOP_LINK'), 'url' => $item->field('DETAIL_PAGE_URL') ); // if (!in_array($x['year'], $this->arResult['filter']['year'])) { // $this->arResult['filter']['year'][] = $x['year']; // } return $x; }
/** * Формирует данные об основном элементе * @param Item $item Item instance * @return array Данные об элменте */ private function composeItem(Item $item) { $x = array( 'id' => $item->field('ID'), 'iblockId' => $item->field('IBLOCK_ID'), 'anounce' => $item->field('PREVIEW_TEXT'), 'photos' => $item->propValueArray('PHOTOS'), 'name' => $item->field('NAME'), 'make' => $item->propValue('MAKE'), 'model' => $item->propValue('MODEL'), 'year' => $item->propValue('YEAR'), 'height' => $item->propValue('HEIGHT'), 'material' => $item->propValue('MATERIAL'), 'features' => $item->propValue('FEATURES'), 'price' => $item->propValue('PRICE'), 'articul' => $item->propValue('ARTICUL'), 'availability' => $item->propValue('AVAILABILITY'), 'shopLink' => $item->propValue('SHOP_LINK'), 'url' => $item->field('DETAIL_PAGE_URL') ); return $this->prepareX($x); }