protected function attached($presenter)
 {
     parent::attached($presenter);
     if (!$this->presenter instanceof Auth) {
         throw new InvalidStateException();
     }
 }
示例#2
0
 protected function attached($presenter)
 {
     parent::attached($presenter);
     if (!$this->presenter instanceof Content) {
         throw new InvalidStateException();
     }
     /** @var FormControl $fc */
     $fc = $this->parent;
     if (!$fc->parent instanceof Comments) {
         throw new InvalidStateException();
     }
     $this->content = $fc->parent->getContent();
 }