/** * Формирует данные об основном элементе * @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'), 'name' => $item->field('NAME'), 'url' => $item->field('DETAIL_PAGE_URL'), 'anounce' => $item->field('PREVIEW_TEXT'), 'picture' => $item->src('PREVIEW_PICTURE'), 'dateCreated' => FormatDate("d.m.Y", MakeTimeStamp($item->field('DATE_CREATE'))) ); 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); }
/** * Формирует данные об основном элементе * @param Item $item Item instance * @return array Данные об элменте */ private function composeItem(Item $item) { $x = array( 'id' => $item->field('ID'), 'iblockId' => $item->field('IBLOCK_ID'), 'text' => $item->field('DETAIL_TEXT'), 'date' => FormatDate("d.m.Y", MakeTimeStamp($item->field('DATE_CREATE'))), 'picture' => $item->src('DETAIL_PICTURE'), 'name' => $item->field('NAME'), 'photos' => $item->propValueArray('GALLERY'), 'video' => $item->propValueArray('VIDEO'), 'footer' => $item->propValueArray('FOOTER') ); return $this->prepareX($x); }
/** * Формирует данные об основном элементе * @param Item $item Item instance * @return array Данные об элменте */ private function composeItem(Item $item) { $x = array( 'id' => $item->field('ID'), 'name' => $item->field('NAME'), 'url' => $item->field('SECTION_PAGE_URL'), 'code' => $item->field('CODE'), 'picture' => $item->src('PICTURE') ); 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'), 'name' => $item->field('NAME'), 'picture' => $item->src('PREVIEW_PICTURE', $resized = false), 'anounce' => $item->field('PREVIEW_TEXT'), 'date' => ConvertDateTime($item->field('DATE_CREATE'), 'DD.MM.YYYY'), 'url' => $item->field('DETAIL_PAGE_URL'), 'shows' => ($item->field('SHOW_COUNTER')) ? $item->field('SHOW_COUNTER') : 0 ); $x['likes'] = $this->likes->count($x['id']); return $x; }