public function addSectionSucceeded(Form $form, $values) { if (isset($values->photo) && !$values->photo->isImage() && $values->photo->isOK()) { $form->addError('Toto není obrázek'); return; } $this->articleManager->addSection($values); $this->flashMessage('Přidáno'); if ($this->isAjax()) { $form->setValues([], true); $this->redrawControl('menu'); } $this->redrawAjax('section'); }