public function __construct(array $data, ItemsService $itemsService)
 {
     $this->itemsService = $itemsService;
     $this->listing = $data['listing'];
     $this->items = $data['items'];
     $items = $this->itemsService->prepareDisplayableItemsCollection($this->items);
     $this->entireListingItemsCollection = $this->itemsService->generateEntireTable($items, \DateTime::createFromFormat('!Y-m', $this->listing['l_year'] . '-' . $this->listing['l_month']));
 }
Esempio n. 2
0
 /**
  * @param array $listingItems
  * @return array Array of ListingItemDecorators
  */
 public function prepareDisplayableItemsCollection(array $listingItems)
 {
     return $this->itemsService->prepareDisplayableItemsCollection($listingItems);
 }