protected function attached($parent) { parent::attached($parent); if (!$parent instanceof UI\Presenter || !Debugger::isEnabled()) { return; } Debugger::$bar->addPanel($this); $this->addText('destination', 'Destination')->addRule($this::FILLED, 'Je třeba zadat destinaci.')->getControlPrototype()->placeholder = 'Please enter destination'; $this->addSubmit('redirect', 'Redirect')->onClick[] = callback($this, 'processRedirect'); $this->addSubmit('showLink', 'Show link')->onClick[] = callback($this, 'processShowLink'); }