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; }
public function __construct(callable $form, callable $items) { parent::__construct(); $this->form = $form; $this->items = $items; }
public function __construct(Nextras\Orm\Entity\IEntity $entity) { parent::__construct(); $this->entity = $entity; }
public function __construct(Nextras\Orm\Repository\IRepository $repository, Ytnuk\Orm\Form\Factory $form) { parent::__construct(); $this->repository = $repository; $this->form = $form; }
public function __construct(Category\Control\Factory $categoryControl, Post\Control\Factory $postControl) { parent::__construct(); $this->categoryControl = $categoryControl; $this->postControl = $postControl; }