class NodesController extends ActionController (View source)

Rudimentary REST service for nodes

Traits

A trait to add backend translation based on the backend users settings

Properties

protected Service $localizationService from  BackendUserTranslationTrait
protected UserService $userService from  BackendUserTranslationTrait
protected NodePropertyConverterService $nodePropertyConverterService
protected PropertyMapper $propertyMapper
protected ContentRepositoryRegistry $contentRepositoryRegistry
protected array<string,string> $viewFormatToObjectNameMap
protected array<int,string> $supportedMediaTypes

A list of IANA media types which are supported by this controller

Methods

void
initializeObject()

Set the locale according to the user settings

void
indexAction(string $searchTerm = '', array $nodeIdentifiers = [], string $workspaceName = 'live', array $dimensions = [], array $nodeTypes = ['Neos.Neos:Document'], string $contextNode = null)

Shows a list of nodes

void
showAction(string $identifier, string $workspaceName = 'live', array $dimensions = [])

Shows a specific node

void
createAction(string $mode, string $identifier, string $workspaceName = 'live', array $dimensions = [], array $sourceDimensions = [])

Create a new node from an existing one

void
addExistingNodeVariantInformationToResponse(NodeAggregateId $identifier, ContentStreamId $contentStreamIdentifier, DimensionSpacePoint $dimensionSpacePoint, ContentRepository $contentRepository)

If the node is not found, we first want to figure out whether the node exists in other dimensions or is really non-existent

void
adoptNodeAndParents(ContentStreamId $contentStreamId, NodeAggregateId $nodeAggregateIdentifier, ContentSubgraphInterface $sourceSubgraph, ContentSubgraphInterface $targetSubgraph, DimensionSpacePoint $targetDimensionSpacePoint, ContentRepository $contentRepository, bool $copyContent)

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

Return Value

void

void indexAction(string $searchTerm = '', array $nodeIdentifiers = [], string $workspaceName = 'live', array $dimensions = [], array $nodeTypes = ['Neos.Neos:Document'], string $contextNode = null)

Shows a list of nodes

Parameters

string $searchTerm

An optional search term used for filtering the list of nodes

array $nodeIdentifiers

An optional list of node identifiers

string $workspaceName

Name of the workspace to search in, "live" by default

array $dimensions

Optional list of dimensions and their values which should be used for querying

array $nodeTypes

A list of node types the list should be filtered by (array(string)

string $contextNode

a node to use as context for the search

Return Value

void

void showAction(string $identifier, string $workspaceName = 'live', array $dimensions = [])

Shows a specific node

Parameters

string $identifier

Specifies the node to look up (NodeAggregateIdentifier)

string $workspaceName

Name of the workspace to use for querying the node

array $dimensions

Optional list of dimensions and their values which should be used for querying the specified node

Return Value

void

void 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

Parameters

string $mode
string $identifier

Specifies the identifier of the node to be created; if source

string $workspaceName

Name of the workspace where to create the node in

array $dimensions

Optional list of dimensions and their values in which the node should be created

array $sourceDimensions

Return Value

void

protected void addExistingNodeVariantInformationToResponse(NodeAggregateId $identifier, ContentStreamId $contentStreamIdentifier, DimensionSpacePoint $dimensionSpacePoint, ContentRepository $contentRepository)

If the node is not found, we first want to figure out whether the node exists in other dimensions or is really non-existent

Parameters

NodeAggregateId $identifier
ContentStreamId $contentStreamIdentifier
DimensionSpacePoint $dimensionSpacePoint
ContentRepository $contentRepository

Return Value

void

protected void adoptNodeAndParents(ContentStreamId $contentStreamId, NodeAggregateId $nodeAggregateIdentifier, ContentSubgraphInterface $sourceSubgraph, ContentSubgraphInterface $targetSubgraph, DimensionSpacePoint $targetDimensionSpacePoint, ContentRepository $contentRepository, bool $copyContent)

Adopt (translate) the given node and parents that are not yet visible to the given context

Parameters

ContentStreamId $contentStreamId
NodeAggregateId $nodeAggregateIdentifier
ContentSubgraphInterface $sourceSubgraph
ContentSubgraphInterface $targetSubgraph
DimensionSpacePoint $targetDimensionSpacePoint
ContentRepository $contentRepository
bool $copyContent

true if the content from the nodes that are translated should be copied

Return Value

void