/** * init * * @return self */ public function init() { $table = Table::getInstance(); $adapter = new SelectSource(); $adapter->setSource($table->advancedSelect()); $this->setAdapter($adapter); $this->setDefaultLimit(25); $this->setAllowOrders(['title', 'id', 'cost', 'categoryId']); $this->setAllowFilters(['title', 'description', 'categoryId', 'id']); return $this; }