Пример #1
0
 public function actionRatings()
 {
     $result = $this->ics->getEmptyRatings($this->user->id);
     if ($result) {
         $this->template->items = $this->ics->ReadMultiple(0, new NFilter(ICF::NO, array_map(function ($row) {
             return $row->items_no;
         }, $result)));
     } else {
         $this->template->items = [];
     }
 }
Пример #2
0
 public function getAll($full = false)
 {
     if ($full) {
         $keys = $this->getKeys();
         if ($keys) {
             $filer = new NFilter(self::KEY_FIELD, $keys);
             $items = $this->itemCardService->ReadMultiple(0, $filer);
             return array_map(function ($item) {
                 $item->{self::ORDER_QUANTITY_FIELD} = $this->getQuantity($item->{self::KEY_FIELD});
                 return $item;
             }, $items);
         }
         return [];
     } else {
         return $this->session;
     }
 }