/** * Формирует данные об основном элементе * @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); }