/** * init * * @return self */ public function init() { $adapter = new \Bluz\Grid\Source\SelectSource(); $musician = Table::select(); $adapter->setSource($musician); $this->setAdapter($adapter); $this->setAllowOrders(['title', 'id', 'created', 'updated']); $this->setAllowFilters(['id', 'nickname', 'image', 'music_id', 'group', 'concert_date']); return $this; }
/** * init * * @return self */ public function init() { // Array $adapter = new \Bluz\Grid\Source\SelectSource(); $select = Table::select(); $adapter->setSource($select); $this->setAdapter($adapter); $this->setDefaultLimit(15); $this->setAllowOrders(['name', 'id', 'status']); $this->setAllowFilters(['status', 'id']); return $this; }
/** * init * * @return self */ public function init() { // Array $adapter = new \Bluz\Grid\Source\SelectSource(); $select = new \Bluz\Db\Query\Select(); $select->select('*')->from('test', 't'); $adapter->setSource($select); $this->setAdapter($adapter); $this->setDefaultLimit(15); $this->setAllowOrders(['name', 'id', 'status']); $this->setAllowFilters(['status', 'id']); return $this; }