示例#1
0
文件: Control.php 项目: ytnuk/blog
 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;
     });
 }
示例#2
0
文件: Control.php 项目: ytnuk/blog
 protected function createComponentPost() : Post\Control
 {
     return $this->postControl->create($this->post ?: new Post\Entity());
 }