public function __construct(Entity $translation, Repository $repository, Form\Control\Factory $formControl, Ytnuk\Orm\Grid\Control\Factory $gridControl) { parent::__construct($translation); $this->translation = $translation; $this->repository = $repository; $this->formControl = $formControl; $this->gridControl = $gridControl; }
protected function getViews() : array { return ['view' => function () { return [$this->product]; }, 'media' => function () { return [$this->product]; }] + parent::getViews(); }
public function __construct(Entity $link, Repository $repository, Control\Factory $control, Form\Control\Factory $formControl, Ytnuk\Orm\Grid\Control\Factory $gridControl) { parent::__construct($link); $this->link = $link; $this->repository = $repository; $this->control = $control; $this->formControl = $formControl; $this->gridControl = $gridControl; }
protected function getViews() : array { return ['view' => function () { return [$this->post]; }, 'item' => function () { return [$this->post]; }, 'info' => function () { return [$this->post]; }] + parent::getViews(); }
protected function getViews() : array { return ['view' => function () { return [$this->category, $this['pagination']['posts']]; }] + parent::getViews(); }
public function __construct(Nextras\Orm\Entity\IEntity $entity, Factory $form) { parent::__construct($entity); $this->entity = $entity; $this->form = $form; }
protected function getViews() : array { return ['view' => function () { return [$this->page]; }] + parent::getViews(); }
public function offsetSet($offset, $menu) { if ($menu instanceof Entity && !$this->active && $offset === NULL) { $this->active = $menu; return; } elseif ($menu instanceof Ytnuk\Translation\Entity) { $entity = new Entity(); $entity->title = $menu; $menu = $entity; } elseif (is_string($menu)) { $this->repository->attach($entity = new Entity()); $entity->title = new Ytnuk\Translation\Entity(); $translate = new Ytnuk\Translation\Translate\Entity(); $translate->value = $this->translator->translate($menu); $entity->title->translates->add($translate); $this->repository->detach($entity); $menu = $entity; } if ($menu instanceof Entity) { if ($offset === NULL) { $this->append[] = $menu; } else { $this->append[$offset] = $menu; } } else { parent::offsetSet($offset, $menu); } }
protected function getViews() : array { return ['title' => TRUE, 'navbar' => TRUE] + parent::getViews(); }