protected function createComponentPost() : Nette\Application\UI\Multiplier { return new Nette\Application\UI\Multiplier(function ($id) : Ytnuk\Blog\Post\Control { $entity = $this->postRepository->getById($id); if ($entity instanceof Ytnuk\Blog\Post\Entity) { return $this->postControl->create($entity); } return NULL; }); }
protected function createComponentPost() : Post\Control { return $this->postControl->create($this->post ?: new Post\Entity()); }