Example #1
0
 public function __construct(Traversable $collection, int $itemsPerPage = 1, Nette\Utils\Paginator $paginator = NULL)
 {
     parent::__construct();
     $this->collection = $collection;
     $paginator = $paginator ?: new Nette\Utils\Paginator();
     $paginator->setBase($this->page);
     $paginator->setItemsPerPage($itemsPerPage);
     $paginator->setItemCount($this->count());
     $this->paginator = $paginator;
 }
Example #2
0
 public function __construct(callable $form, callable $items)
 {
     parent::__construct();
     $this->form = $form;
     $this->items = $items;
 }
Example #3
0
 public function __construct(Nextras\Orm\Entity\IEntity $entity)
 {
     parent::__construct();
     $this->entity = $entity;
 }
Example #4
0
 public function __construct(Nextras\Orm\Repository\IRepository $repository, Ytnuk\Orm\Form\Factory $form)
 {
     parent::__construct();
     $this->repository = $repository;
     $this->form = $form;
 }
Example #5
0
 public function __construct(Category\Control\Factory $categoryControl, Post\Control\Factory $postControl)
 {
     parent::__construct();
     $this->categoryControl = $categoryControl;
     $this->postControl = $postControl;
 }