PHP Class Neos\Neos\Service\Controller\NodeController

Note: This controller should be, step-by-step, transformed into a clean REST controller (see NEOS-190 and NEOS-199). Since this is a rather big endeavor, we slice the elephant and move methods in a clean way from here to the new NodesController (\Neos\Neos\Controller\Service\NodesController)
Inheritance: extends AbstractServiceController
Afficher le fichier Open project: neos/neos-development-collection

Protected Properties

Свойство Type Description
$contextFactory Neos\ContentRepository\Domain\Service\ContextFactoryInterface
$domainRepository Neos\Neos\Domain\Repository\DomainRepository
$nodeDataRepository Neos\ContentRepository\Domain\Repository\NodeDataRepository
$nodeFactory Neos\ContentRepository\Domain\Factory\NodeFactory
$nodeOperations Neos\Neos\Service\NodeOperations
$nodeSearchService Neos\Neos\Domain\Service\NodeSearchService
$nodeTypeManager Neos\ContentRepository\Domain\Service\NodeTypeManager
$supportedMediaTypes array
$view Neos\Neos\Service\View\NodeView
$viewFormatToObjectNameMap array

Méthodes publiques

Méthode Description
copyAction ( Node $node, Node $targetNode, string $position, string $nodeName = null ) : void Copy $node before, into or after $targetNode
copyAndRenderAction ( Node $node, Node $targetNode, string $position, string $typoScriptPath, string $nodeName = null ) : void Copies the given node before, into or after the target node depending on the given position and renders it's content collection.
createAction ( Node $referenceNode, array $nodeData, string $position ) : void Creates a new node
createAndRenderAction ( Node $referenceNode, string $typoScriptPath, array $nodeData, string $position ) : string Creates a new node and renders the node inside the containing content collection.
createNodeForTheTreeAction ( Node $referenceNode, array $nodeData, string $position, string $nodeTypeFilter = '' ) : void Creates a new node and returns tree structure
deleteAction ( Node $node ) : void Deletes the specified node and all of its sub nodes
filterChildNodesForTreeAction ( Node $node, string $term, string $nodeType ) : void Return child nodes of specified node for usage in a TreeLoader based on filter
getChildNodesForTreeAction ( Node $node, string $nodeTypeFilter, integer $depth, Node $untilNode ) : void Return child nodes of specified node for usage in a TreeLoader
moveAction ( Node $node, Node $targetNode, string $position ) : void Move $node before, into or after $targetNode
moveAndRenderAction ( Node $node, Node $targetNode, string $position, string $typoScriptPath ) : void Move the given node before, into or after the target node depending on the given position and renders it's content collection.
searchPageAction ( string $query ) : void Search a page, needed for internal links.
updateAction ( Node $node ) : void Updates the specified node.
updateAndRenderAction ( Node $node, string $typoScriptPath ) : void Updates the specified node and renders it's content collection.

Méthodes protégées

Méthode Description
createContext ( string $workspaceName ) : Context Create a Context for a workspace given by name to be used in this controller.
initializeAction ( ) : void Select special error action
processNodeForEditorPlugins ( Neos\ContentRepository\Domain\Model\NodeInterface $node ) : array Returns an array with the data needed by for example the Hallo and Aloha link plugins to represent the passed Node instance.
redirectToRenderNode ( Neos\ContentRepository\Domain\Model\NodeInterface $node, string $typoScriptPath ) : string Takes care of creating a redirect to properly render the collection the given node is in.

Method Details

copyAction() public méthode

We need to call persistAll() in order to return the nextUri. We can't persist only the nodes in NodeDataRepository because they might be connected to images / resources which need to be updated at the same time.
public copyAction ( Node $node, Node $targetNode, string $position, string $nodeName = null ) : void
$node Neos\ContentRepository\Domain\Model\Node The node to be copied
$targetNode Neos\ContentRepository\Domain\Model\Node The target node to be copied "to", see $position
$position string Where the node should be added in relation to $targetNode (allowed: before, into, after)
$nodeName string Optional node name (if empty random node name will be generated)
Résultat void

copyAndRenderAction() public méthode

Copies the given node before, into or after the target node depending on the given position and renders it's content collection.
public copyAndRenderAction ( Node $node, Node $targetNode, string $position, string $typoScriptPath, string $nodeName = null ) : void
$node Neos\ContentRepository\Domain\Model\Node The node to be copied
$targetNode Neos\ContentRepository\Domain\Model\Node The target node to be copied "to", see $position
$position string Where the node should be added in relation to $targetNode (allowed: before, into, after)
$typoScriptPath string The TypoScript path of the collection
$nodeName string Optional node name (if empty random node name will be generated)
Résultat void

createAction() public méthode

We need to call persistAll() in order to return the nextUri. We can't persist only the nodes in NodeDataRepository because they might be connected to images / resources which need to be updated at the same time.
public createAction ( Node $referenceNode, array $nodeData, string $position ) : void
$referenceNode Neos\ContentRepository\Domain\Model\Node
$nodeData array
$position string where the node should be added (allowed: before, into, after)
Résultat void

createAndRenderAction() public méthode

Creates a new node and renders the node inside the containing content collection.
public createAndRenderAction ( Node $referenceNode, string $typoScriptPath, array $nodeData, string $position ) : string
$referenceNode Neos\ContentRepository\Domain\Model\Node
$typoScriptPath string The TypoScript path of the collection
$nodeData array
$position string where the node should be added (allowed: before, into, after)
Résultat string

createContext() protected méthode

Create a Context for a workspace given by name to be used in this controller.
protected createContext ( string $workspaceName ) : Context
$workspaceName string Name of the current workspace
Résultat Neos\ContentRepository\Domain\Service\Context

createNodeForTheTreeAction() public méthode

Creates a new node and returns tree structure
public createNodeForTheTreeAction ( Node $referenceNode, array $nodeData, string $position, string $nodeTypeFilter = '' ) : void
$referenceNode Neos\ContentRepository\Domain\Model\Node
$nodeData array
$position string where the node should be added, -1 is before, 0 is in, 1 is after
$nodeTypeFilter string
Résultat void

deleteAction() public méthode

We need to call persistAll() in order to return the nextUri. We can't persist only the nodes in NodeDataRepository because they might be connected to images / resources which need to be removed at the same time.
public deleteAction ( Node $node ) : void
$node Neos\ContentRepository\Domain\Model\Node
Résultat void

filterChildNodesForTreeAction() public méthode

Return child nodes of specified node for usage in a TreeLoader based on filter
public filterChildNodesForTreeAction ( Node $node, string $term, string $nodeType ) : void
$node Neos\ContentRepository\Domain\Model\Node The node to find child nodes for
$term string
$nodeType string
Résultat void

getChildNodesForTreeAction() public méthode

Return child nodes of specified node for usage in a TreeLoader
public getChildNodesForTreeAction ( Node $node, string $nodeTypeFilter, integer $depth, Node $untilNode ) : void
$node Neos\ContentRepository\Domain\Model\Node The node to find child nodes for
$nodeTypeFilter string A node type filter
$depth integer levels of childNodes (0 = unlimited)
$untilNode Neos\ContentRepository\Domain\Model\Node expand the child nodes until $untilNode is reached, independent of $depth
Résultat void

initializeAction() protected méthode

Select special error action
protected initializeAction ( ) : void
Résultat void

moveAction() public méthode

We need to call persistAll() in order to return the nextUri. We can't persist only the nodes in NodeDataRepository because they might be connected to images / resources which need to be updated at the same time.
public moveAction ( Node $node, Node $targetNode, string $position ) : void
$node Neos\ContentRepository\Domain\Model\Node The node to be moved
$targetNode Neos\ContentRepository\Domain\Model\Node The target node to be moved "to", see $position
$position string where the node should be added (allowed: before, into, after)
Résultat void

moveAndRenderAction() public méthode

Move the given node before, into or after the target node depending on the given position and renders it's content collection.
public moveAndRenderAction ( Node $node, Node $targetNode, string $position, string $typoScriptPath ) : void
$node Neos\ContentRepository\Domain\Model\Node The node to be moved
$targetNode Neos\ContentRepository\Domain\Model\Node The target node to be moved "to", see $position
$position string Where the node should be added in relation to $targetNode (allowed: before, into, after)
$typoScriptPath string The TypoScript path of the collection
Résultat void

processNodeForEditorPlugins() protected méthode

Returns an array with the data needed by for example the Hallo and Aloha link plugins to represent the passed Node instance.
protected processNodeForEditorPlugins ( Neos\ContentRepository\Domain\Model\NodeInterface $node ) : array
$node Neos\ContentRepository\Domain\Model\NodeInterface
Résultat array

redirectToRenderNode() protected méthode

Takes care of creating a redirect to properly render the collection the given node is in.
protected redirectToRenderNode ( Neos\ContentRepository\Domain\Model\NodeInterface $node, string $typoScriptPath ) : string
$node Neos\ContentRepository\Domain\Model\NodeInterface
$typoScriptPath string
Résultat string

searchPageAction() public méthode

Search a page, needed for internal links.
Deprecation: will be removed with 3.0, use Service/NodesController->indexAction() instead
public searchPageAction ( string $query ) : void
$query string
Résultat void

updateAction() public méthode

Returns the following data: - the (possibly changed) workspace name of the node - the URI of the closest document node. If $node is a document node (f.e. a Page), the own URI is returned. This is important to handle renames of nodes correctly. Note: We do not call $nodeDataRepository->update() here, as ContentRepository has a stateful API for now. We need to call persistAll() in order to return the nextUri. We can't persist only the nodes in NodeDataRepository because they might be connected to images / resources which need to be updated at the same time.
public updateAction ( Node $node ) : void
$node Neos\ContentRepository\Domain\Model\Node The node to be updated
Résultat void

updateAndRenderAction() public méthode

Updates the specified node and renders it's content collection.
public updateAndRenderAction ( Node $node, string $typoScriptPath ) : void
$node Neos\ContentRepository\Domain\Model\Node The node to be updated
$typoScriptPath string The TypoScript path of the collection
Résultat void

Property Details

$contextFactory protected_oe property

protected ContextFactoryInterface,Neos\ContentRepository\Domain\Service $contextFactory
Résultat Neos\ContentRepository\Domain\Service\ContextFactoryInterface

$domainRepository protected_oe property

protected DomainRepository,Neos\Neos\Domain\Repository $domainRepository
Résultat Neos\Neos\Domain\Repository\DomainRepository

$nodeDataRepository protected_oe property

protected NodeDataRepository,Neos\ContentRepository\Domain\Repository $nodeDataRepository
Résultat Neos\ContentRepository\Domain\Repository\NodeDataRepository

$nodeFactory protected_oe property

protected NodeFactory,Neos\ContentRepository\Domain\Factory $nodeFactory
Résultat Neos\ContentRepository\Domain\Factory\NodeFactory

$nodeOperations protected_oe property

protected NodeOperations,Neos\Neos\Service $nodeOperations
Résultat Neos\Neos\Service\NodeOperations

$nodeSearchService protected_oe property

protected NodeSearchService,Neos\Neos\Domain\Service $nodeSearchService
Résultat Neos\Neos\Domain\Service\NodeSearchService

$nodeTypeManager protected_oe property

protected NodeTypeManager,Neos\ContentRepository\Domain\Service $nodeTypeManager
Résultat Neos\ContentRepository\Domain\Service\NodeTypeManager

$supportedMediaTypes protected_oe property

protected array $supportedMediaTypes
Résultat array

$view protected_oe property

protected NodeView,Neos\Neos\Service\View $view
Résultat Neos\Neos\Service\View\NodeView

$viewFormatToObjectNameMap protected_oe property

protected array $viewFormatToObjectNameMap
Résultat array