Ojs\ApiBundle\Controller\Admin\PublisherManagerRestController::postPublishermanagerAction PHP Метод

postPublishermanagerAction() публичный Метод

Create a PublisherManager from the submitted data.
public postPublishermanagerAction ( Request $request ) : Symfony\Component\Form\FormTypeInterface | FOS\RestBundle\Controller\Annotations\View
$request Symfony\Component\HttpFoundation\Request the request object
Результат Symfony\Component\Form\FormTypeInterface | FOS\RestBundle\Controller\Annotations\View
    public function postPublishermanagerAction(Request $request)
    {
        if (!$this->isGranted('CREATE', new PublisherManagers())) {
            throw new AccessDeniedException();
        }
        try {
            $newEntity = $this->container->get('ojs_api.publisher_manager.handler')->post($request->request->all());
            $routeOptions = array('id' => $newEntity->getId(), '_format' => $request->get('_format'));
            return $this->routeRedirectView('api_1_get_publishermanager', $routeOptions, Codes::HTTP_CREATED);
        } catch (InvalidFormException $exception) {
            return $exception->getForm();
        }
    }