createContent() public method

If a different userId is given in the input it is assigned to the given user but this required special rights for the authenticated user (this is useful for content staging where the transfer process does not have to authenticate with the user which created the content object in the source server). The user has to publish the content if it should be visible.
public createContent ( Request $request ) : CreatedContent
$request Symfony\Component\HttpFoundation\Request
return eZ\Publish\Core\REST\Server\Values\CreatedContent
Exemplo n.º 1
0
 public function createContent(Request $request)
 {
     if (!$this->isUserCreateRequest($request)) {
         return parent::createContent($request);
     }
     $createdUser = $this->repository->getUserService()->createUser($this->mapRequestToUserCreateStruct($request), $this->mapRequestToParentGroups($request));
     return $this->mapUserToCreatedContent($createdUser);
 }