public function signalReceived($signal)
    {
        if ($signal === 'submit') {
            if (!$this->getPresenter()->getRequest()->hasFlag(Nette\Application\Request::RESTORED)) {
                $this->fireEvents();
            }
        } else {
            $class = get_class($this);
            throw new BadSignalException("Missing handler for signal '$signal' in $class.");
        }
    }