/** * @param IPresenter|RequestButtonReceiver */ protected function attached($parent) { if ($parent instanceof IPresenter) { $receivedId = $this->form->presenter->getParam(RequestButton::RECEIVED_KEY); if ($receivedId and !$this->lookup('Nette\\Forms\\Form') instanceof RequestButtonReceiver and $this->lookupPath('Nette\\Application\\UI\\Presenter', TRUE) === RequestButtonStorage::getName($receivedId) and RequestButtonStorage::is($receivedId)) { $this->form->setValues(RequestButtonStorage::getData($receivedId)); // todo tohle asi neni potreba, protoze to uz obstarave RequestButtonReceiver nebo RequestButtonHelper::prepareForm() } } else { if ($parent instanceof RequestButtonReceiver) { $this->formIsPrepared = true; } } parent::attached($parent); }