Пример #1
0
 protected function attached($obj)
 {
     parent::attached($obj);
     if ($obj instanceof IPresenter) {
         $this->whenAttached();
     }
 }
 protected function attached($obj)
 {
     parent::attached($obj);
     if ($obj instanceof Form) {
         $this->configure();
     }
 }
Пример #3
0
 /**
  * @param \Nette\ComponentModel\IContainer
  */
 protected function attached($presenter)
 {
     parent::attached($presenter);
     if (!$presenter instanceof Nette\Application\UI\Presenter) {
         return;
     }
     $this->loadHttpData();
 }
Пример #4
0
 /**
  * Magical component factory
  *
  * @param \Nette\ComponentModel\IContainer
  */
 protected function attached($obj)
 {
     parent::attached($obj);
     if (!$obj instanceof Nette\Application\UI\Presenter) {
         return;
     }
     $this->loadHttpData();
     $this->createDefault();
 }
Пример #5
0
 /**
  * @param \Nette\ComponentModel\Container $obj
  */
 protected function attached($obj)
 {
     parent::attached($obj);
     if (!$obj instanceof UI\Presenter) {
         return;
     }
     /** @var UI\Form|EntityForm $form */
     $form = $this->getForm();
     if (!$form->isSubmitted()) {
         return;
     }
     foreach (array_keys($this->getHttpData()) as $id) {
         $this->getComponent($id);
         // eager initialize
     }
 }