Beispiel #1
0
 /**
  * @param array $formData
  *
  * @return \Symfony\Component\HttpFoundation\RedirectResponse
  */
 protected function executePost(array $formData)
 {
     return $this->actionHelper->handleCreatePostAction(function () use($formData) {
         $this->galleryFormValidation->validate($formData);
         $formData['user_id'] = $this->user->getUserId();
         return $this->galleryModel->save($formData);
     });
 }
Beispiel #2
0
Datei: Edit.php Projekt: acp3/cms
 /**
  * @param array $formData
  * @param int   $galleryId
  *
  * @return \Symfony\Component\HttpFoundation\RedirectResponse
  */
 protected function executePost(array $formData, $galleryId)
 {
     return $this->actionHelper->handleEditPostAction(function () use($formData, $galleryId) {
         $this->galleryFormValidation->setUriAlias(sprintf(Gallery\Helpers::URL_KEY_PATTERN_GALLERY, $galleryId))->validate($formData);
         $formData['user_id'] = $this->user->getUserId();
         return $this->galleryModel->save($formData, $galleryId);
     });
 }