eZ\Publish\Core\REST\Server\Controller\Section::createSection PHP Méthode

createSection() public méthode

Create new section.
public createSection ( Request $request ) : CreatedSection
$request Symfony\Component\HttpFoundation\Request
Résultat eZ\Publish\Core\REST\Server\Values\CreatedSection
    public function createSection(Request $request)
    {
        try {
            $createdSection = $this->sectionService->createSection($this->inputDispatcher->parse(new Message(array('Content-Type' => $request->headers->get('Content-Type')), $request->getContent())));
        } catch (InvalidArgumentException $e) {
            throw new ForbiddenException($e->getMessage());
        }
        return new Values\CreatedSection(array('section' => $createdSection));
    }