eZ\Publish\Core\REST\Server\Controller\Section::updateSection PHP Метод

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

Updates a section.
public updateSection ( $sectionId, Request $request ) : eZ\Publish\API\Repository\Values\Content\Section
$sectionId
$request Symfony\Component\HttpFoundation\Request
Результат eZ\Publish\API\Repository\Values\Content\Section
    public function updateSection($sectionId, Request $request)
    {
        $createStruct = $this->inputDispatcher->parse(new Message(array('Content-Type' => $request->headers->get('Content-Type')), $request->getContent()));
        try {
            return $this->sectionService->updateSection($this->sectionService->loadSection($sectionId), $this->mapToUpdateStruct($createStruct));
        } catch (InvalidArgumentException $e) {
            throw new ForbiddenException($e->getMessage());
        }
    }