NodesController
class NodesController extends ActionController (View source)
Rudimentary REST service for nodes
Traits
A trait to add backend translation based on the backend users settings
A trait to add create a content context
Properties
protected Service | $_localizationService | from BackendUserTranslationTrait | |
protected UserService | $_userService | from BackendUserTranslationTrait | |
protected ContentContextFactory | $_contextFactory | from CreateContentContextTrait | |
protected SiteRepository | $_siteRepository | from CreateContentContextTrait | |
protected NodeTypeManager | $nodeTypeManager | ||
protected NodeSearchServiceInterface | $nodeSearchService | ||
protected PropertyMapper | $propertyMapper | ||
protected NodePropertyConverterService | $nodePropertyConverterService | ||
protected array | $viewFormatToObjectNameMap | ||
protected array | $supportedMediaTypes | A list of IANA media types which are supported by this controller |
Methods
Set the locale according to the user settings
Create a ContentContext based on the given workspace name
Generates a Context that exactly fits the given NodeData Workspace, Dimensions & Site.
Shows a list of nodes
Shows a specific node
Create a new node from an existing one
If the node is not found, we first want to figure out whether the node exists in other dimensions or is really non-existent
Adopt (translate) the given node and parents that are not yet visible to the given context
Details
protected void
initializeObject()
Set the locale according to the user settings
protected ContentContext
createContentContext(string $workspaceName, array $dimensions = [])
Create a ContentContext based on the given workspace name
protected ContentContext
createContextMatchingNodeData(NodeData $nodeData)
Generates a Context that exactly fits the given NodeData Workspace, Dimensions & Site.
string
indexAction(string $searchTerm = '', array $nodeIdentifiers = [], string $workspaceName = 'live', array $dimensions = [], array $nodeTypes = ['Neos.Neos:Document'], NodeInterface $contextNode = null)
Shows a list of nodes
string
showAction(string $identifier, string $workspaceName = 'live', array $dimensions = [])
Shows a specific node
string
createAction(string $mode, string $identifier, string $workspaceName = 'live', array $dimensions = [], array $sourceDimensions = [])
Create a new node from an existing one
The "mode" property defines the basic mode of operation. Currently supported modes:
'adoptFromAnotherDimension': Adopts the single node from another dimension
- $identifier, $workspaceName and $sourceDimensions specify the source node
- $identifier, $workspaceName and $dimensions specify the target node
protected void
addExistingNodeVariantInformationToResponse($identifier, ContentContext $context)
If the node is not found, we first want to figure out whether the node exists in other dimensions or is really non-existent
protected void
adoptNodeAndParents(NodeInterface $node, ContentContext $contentContext, bool $copyContent)
Adopt (translate) the given node and parents that are not yet visible to the given context