Beispiel #1
0
 /**
  * Visitors controller index action
  */
 public function indexAction()
 {
     $this->breadcrumbsBlock->addBreadcrumb('Visitors', 'admin/visitors');
     $collection = \Magelight\Db\Collection::forge(\Magelight\Visitors\Models\Visitor::orm()->orderByDesc('time'))->setLimit(30);
     $page = $this->request()->getRequest('page', 0);
     $this->view()->sectionReplace('content', \Magelight\Visitors\Blocks\VisitorsList::forge($collection, $page));
     $this->renderView();
 }
Beispiel #2
0
 /**
  * Get entity collection
  *
  * @return \Magelight\Db\Collection
  */
 public function getCollection()
 {
     return \Magelight\Db\Collection::forge($this->scaffold->getEntityModel($this->entity)->getOrm())->setLimit(10)->setPage($this->page);
 }
Beispiel #3
0
 /**
  * Get models flat collection
  *
  * @return Db\Collection
  */
 public static function getFlatCollection()
 {
     return \Magelight\Db\Collection::forge(static::callStaticLate('orm'));
 }