/** * Handles automatic pagination of model records. * * @overwrite to support defaults like limit etc. * @param \Cake\ORM\Table|string|\Cake\ORM\Query $object Table to paginate * (e.g: Table instance, 'TableName' or a Query object) * @return \Cake\ORM\ResultSet Query results */ public function paginate($object = null) { if ($defaultSettings = (array) Configure::read('Paginator')) { $this->paginate += $defaultSettings; } return parent::paginate($object); }
/** * Handles automatic pagination of model records. * * @override To support defaults like limit etc. * * @param \Cake\ORM\Table|string|\Cake\ORM\Query|null $object Table to paginate * (e.g: Table instance, 'TableName' or a Query object) * @param array $settings Settings * * @return \Cake\ORM\ResultSet Query results */ public function paginate($object = null, array $settings = []) { $defaultSettings = (array) Configure::read('Paginator'); if ($defaultSettings) { $this->paginate += $defaultSettings; } return parent::paginate($object, $settings); }
/** * @return void */ public function testAfterFilter() { $event = new Event('afterFilter'); $this->Controller->afterFilter($event); }