getList() public method

Return list of resources
public getList ( ) : mixed
return mixed
Beispiel #1
0
 public function getList()
 {
     if (!$this->getOptions()->getRestEnabled()) {
         return parent::getList();
     }
     $this->getResponse()->getHeaders()->addHeaderLine('Content-Type', 'application/json');
     $result = array();
     $items = $this->getAll();
     foreach ($items as $item) {
         $result[] = $this->itemToSerializable($item);
     }
     return new JsonModel($result);
 }