/** * Forgery * * @param $entity * @param $page */ public function __forge($entity, $page) { $this->setEntity($entity); $this->setPage($page); $this->scaffold = \Magelight\Admin\Models\Scaffold\Scaffold::forge(); $this->scaffold->loadEntities(); $this->sectionReplace('pager', \Magelight\Core\Blocks\Pager::forge($this->getCollection())->setRoute(\Magelight\App::getInstance()->getCurrentAction()['match'], ['entity' => $entity])->addClass('pagination-small')->addClass('pagination-centered')); }
/** * Get pager block * * @return \Magelight\Core\Blocks\Pager */ protected function getPagerBlock() { $pagerBlock = \Magelight\Core\Blocks\Pager::forge($this->collection); $pagerBlock->setCurrentPage($this->currentPage)->setRoute('admin/visitors'); return $pagerBlock; }