Пример #1
0
 public function brandFormSubmitted(Form $form)
 {
     $values = $form->getValues();
     if ($values->brand_id) {
         $this->brandManager->update($values->brand_id, $values->title);
         $this->flashMessage('Category has been successfully updated.', 'success');
     } else {
         $this->brandManager->insert($values->title);
         $this->flashMessage('New brand has been successfully created.', 'success');
     }
     $this->redirect('default');
 }