/** * @param array $formData * * @return \Symfony\Component\HttpFoundation\RedirectResponse */ protected function executePost(array $formData) { return $this->actionHelper->handleCreatePostAction(function () use($formData) { $this->resourceFormValidation->validate($formData); $formData['module_id'] = $this->fetchModuleId($formData['modules']); return $this->resourcesModel->save($formData); }); }
/** * @param string $action * * @return mixed * @throws \ACP3\Core\Controller\Exception\ResultNotExistsException */ public function execute($action = '') { return $this->actionHelper->handleDeleteAction($action, function (array $items) { return $this->resourcesModel->delete($items); }); }