eZ\Publish\Core\REST\Server\Controller\User::updateUserGroup PHP 메소드

updateUserGroup() 공개 메소드

Updates a user group.
public updateUserGroup ( $groupPath, Request $request ) : RestUserGroup
$groupPath
$request Symfony\Component\HttpFoundation\Request
리턴 eZ\Publish\Core\REST\Server\Values\RestUserGroup
    public function updateUserGroup($groupPath, Request $request)
    {
        $userGroupLocation = $this->locationService->loadLocation($this->extractLocationIdFromPath($groupPath));
        $userGroup = $this->userService->loadUserGroup($userGroupLocation->contentId);
        $updateStruct = $this->inputDispatcher->parse(new Message(array('Content-Type' => $request->headers->get('Content-Type'), 'Url' => $request->getPathInfo()), $request->getContent()));
        if ($updateStruct->sectionId !== null) {
            $section = $this->sectionService->loadSection($updateStruct->sectionId);
            $this->sectionService->assignSection($userGroup->getVersionInfo()->getContentInfo(), $section);
        }
        $updatedGroup = $this->userService->updateUserGroup($userGroup, $updateStruct->userGroupUpdateStruct);
        $contentType = $this->contentTypeService->loadContentType($updatedGroup->getVersionInfo()->getContentInfo()->contentTypeId);
        return new Values\RestUserGroup($updatedGroup, $contentType, $updatedGroup->getVersionInfo()->getContentInfo(), $userGroupLocation, $this->contentService->loadRelations($updatedGroup->getVersionInfo()));
    }