PHP Class Sulu\Bundle\ContentBundle\Controller\NodeController

Inheritance: extends Sulu\Component\Rest\RestController, implements FOS\RestBundle\Routing\ClassResourceInterface, implements Sulu\Component\Security\SecuredControllerInterface, implements Sulu\Component\Security\Authorization\AccessControl\SecuredObjectControllerInterface, use trait Sulu\Component\Rest\RequestParametersTrait
Datei anzeigen Open project: sulu/sulu

Public Methods

Method Description
cgetAction ( Request $request ) : Response returns all content items as JSON String.
cgetNodes ( Request $request ) : Response Returns complete nodes.
deleteAction ( Request $request, string $uuid ) : Response deletes node with given uuid.
entryAction ( Request $request ) : Response returns entry point (webspace as node).
filterAction ( Request $request ) : Response Returns the title of the pages for a given smart content configuration.
getAction ( Request $request, string $uuid ) : Response returns a content item with given UUID as JSON String.
getLocale ( Request $request )
getSecuredClass ( )
getSecuredObjectId ( Request $request )
getSecurityContext ( )
indexAction ( Request $request ) : Response returns a content item for startpage.
postAction ( Request $request ) : Response Updates a content item and returns result as JSON String.
postTriggerAction ( string $uuid, Request $request ) : Response trigger a action for given node specified over get-action parameter - move: moves a node + destination: specifies the destination node - copy: copy a node + destination: specifies the destination node.
putAction ( Request $request, string $uuid ) : Response saves node with given uuid and data.

Protected Methods

Method Description
getDocumentManager ( ) : Sulu\Component\DocumentManager\DocumentManagerInterface
getMetadataFactory ( ) : Sulu\Component\DocumentManager\Metadata\BaseMetadataFactory
getRepository ( ) : Sulu\Bundle\ContentBundle\Repository\NodeRepositoryInterface

Private Methods

Method Description
cgetContent ( Request $request ) : Response Returns content array by parent or webspace root.
checkActionParameterSecurity ( string $actionParameter, string $locale, string $uuid = null ) Checks if the user has the required permissions for the given action with the given locale. The additional uuid parameter will also include checks for the document identified by it.
getContent ( Request $request, $uuid ) : Response Returns single content.
getLanguage ( Request $request ) : string returns language code from request.
getNodesByIds ( Request $request, array $idString ) : Response Returns nodes by given ids.
getSingleNode ( Request $request, string $uuid ) : Response
getTreeContent ( string $uuid, string $locale, string $webspaceKey, boolean $webspaceNodes, Sulu\Component\Content\Repository\Mapping\MappingInterface $mapping, Sulu\Component\Security\Authentication\UserInterface $user ) : Response Returns tree response for given uuid.
getTreeForUuid ( Request $request, string $uuid ) : Response Returns a tree along the given path with the siblings of all nodes on the path.
getWebspace ( Request $request, boolean $force = true ) : string returns webspace key from request.
getWebspaceNode ( Sulu\Component\Content\Repository\Mapping\MappingInterface $mapping, array $contents, string $webspaceKey, string $locale, Sulu\Component\Security\Authentication\UserInterface $user ) : Content[] Returns content for all webspaces.
getWebspaceNodes ( Sulu\Component\Content\Repository\Mapping\MappingInterface $mapping, array $contents, string | null $webspaceKey, string $locale, Sulu\Component\Security\Authentication\UserInterface $user ) : Content[] Returns content for all webspaces.
getWebspaceNodesByPaths ( array $paths, string $webspaceKey, string $locale, Sulu\Component\Content\Repository\Mapping\MappingInterface $mapping, array $webspaces, array $contents, Sulu\Component\Security\Authentication\UserInterface $user ) : Content[]
handleActionParameter ( string $actionParameter, object $document, string $locale ) Delegates actions by given actionParameter, which can be retrieved from the request.
persistDocument ( Request $request, $type, $document, $language ) Persists the document using the given information.

Method Details

cgetAction() public method

returns all content items as JSON String.
public cgetAction ( Request $request ) : Response
$request Symfony\Component\HttpFoundation\Request
return Symfony\Component\HttpFoundation\Response

cgetNodes() public method

Returns complete nodes.
Deprecation: this will be removed when the content-repository is able to solve all requirements
public cgetNodes ( Request $request ) : Response
$request Symfony\Component\HttpFoundation\Request
return Symfony\Component\HttpFoundation\Response

deleteAction() public method

deletes node with given uuid.
public deleteAction ( Request $request, string $uuid ) : Response
$request Symfony\Component\HttpFoundation\Request
$uuid string
return Symfony\Component\HttpFoundation\Response

entryAction() public method

returns entry point (webspace as node).
public entryAction ( Request $request ) : Response
$request Symfony\Component\HttpFoundation\Request
return Symfony\Component\HttpFoundation\Response

filterAction() public method

Returns the title of the pages for a given smart content configuration.
Deprecation: will be removed with version 1.2
public filterAction ( Request $request ) : Response
$request Symfony\Component\HttpFoundation\Request
return Symfony\Component\HttpFoundation\Response

getAction() public method

returns a content item with given UUID as JSON String.
public getAction ( Request $request, string $uuid ) : Response
$request Symfony\Component\HttpFoundation\Request
$uuid string
return Symfony\Component\HttpFoundation\Response

getDocumentManager() protected method

protected getDocumentManager ( ) : Sulu\Component\DocumentManager\DocumentManagerInterface
return Sulu\Component\DocumentManager\DocumentManagerInterface

getLocale() public method

public getLocale ( Request $request )
$request Symfony\Component\HttpFoundation\Request

getMetadataFactory() protected method

protected getMetadataFactory ( ) : Sulu\Component\DocumentManager\Metadata\BaseMetadataFactory
return Sulu\Component\DocumentManager\Metadata\BaseMetadataFactory

getRepository() protected method

protected getRepository ( ) : Sulu\Bundle\ContentBundle\Repository\NodeRepositoryInterface
return Sulu\Bundle\ContentBundle\Repository\NodeRepositoryInterface

getSecuredClass() public method

public getSecuredClass ( )

getSecuredObjectId() public method

public getSecuredObjectId ( Request $request )
$request Symfony\Component\HttpFoundation\Request

getSecurityContext() public method

public getSecurityContext ( )

indexAction() public method

returns a content item for startpage.
public indexAction ( Request $request ) : Response
$request Symfony\Component\HttpFoundation\Request
return Symfony\Component\HttpFoundation\Response

postAction() public method

Updates a content item and returns result as JSON String.
public postAction ( Request $request ) : Response
$request Symfony\Component\HttpFoundation\Request
return Symfony\Component\HttpFoundation\Response

postTriggerAction() public method

trigger a action for given node specified over get-action parameter - move: moves a node + destination: specifies the destination node - copy: copy a node + destination: specifies the destination node.
public postTriggerAction ( string $uuid, Request $request ) : Response
$uuid string
$request Symfony\Component\HttpFoundation\Request
return Symfony\Component\HttpFoundation\Response

putAction() public method

saves node with given uuid and data.
public putAction ( Request $request, string $uuid ) : Response
$request Symfony\Component\HttpFoundation\Request
$uuid string
return Symfony\Component\HttpFoundation\Response