예제 #1
0
파일: Create.php 프로젝트: acp3/cms
 /**
  * @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);
     });
 }
예제 #2
0
파일: Edit.php 프로젝트: 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);
     });
 }