PHP Класс 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)
Наследование: extends AbstractServiceController
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$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

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
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.

Описание методов

copyAction() публичный Метод

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)
Результат void

copyAndRenderAction() публичный Метод

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)
Результат void

createAction() публичный Метод

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)
Результат void

createAndRenderAction() публичный Метод

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)
Результат string

createContext() защищенный Метод

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
Результат Neos\ContentRepository\Domain\Service\Context

createNodeForTheTreeAction() публичный Метод

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
Результат void

deleteAction() публичный Метод

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
Результат void

filterChildNodesForTreeAction() публичный Метод

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
Результат void

getChildNodesForTreeAction() публичный Метод

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
Результат void

initializeAction() защищенный Метод

Select special error action
protected initializeAction ( ) : void
Результат void

moveAction() публичный Метод

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)
Результат void

moveAndRenderAction() публичный Метод

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
Результат void

processNodeForEditorPlugins() защищенный Метод

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
Результат array

redirectToRenderNode() защищенный Метод

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
Результат string

searchPageAction() публичный Метод

Search a page, needed for internal links.
Устаревший: will be removed with 3.0, use Service/NodesController->indexAction() instead
public searchPageAction ( string $query ) : void
$query string
Результат void

updateAction() публичный Метод

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
Результат void

updateAndRenderAction() публичный Метод

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
Результат void

Описание свойств

$contextFactory защищенное свойство

protected ContextFactoryInterface,Neos\ContentRepository\Domain\Service $contextFactory
Результат Neos\ContentRepository\Domain\Service\ContextFactoryInterface

$domainRepository защищенное свойство

protected DomainRepository,Neos\Neos\Domain\Repository $domainRepository
Результат Neos\Neos\Domain\Repository\DomainRepository

$nodeDataRepository защищенное свойство

protected NodeDataRepository,Neos\ContentRepository\Domain\Repository $nodeDataRepository
Результат Neos\ContentRepository\Domain\Repository\NodeDataRepository

$nodeFactory защищенное свойство

protected NodeFactory,Neos\ContentRepository\Domain\Factory $nodeFactory
Результат Neos\ContentRepository\Domain\Factory\NodeFactory

$nodeOperations защищенное свойство

protected NodeOperations,Neos\Neos\Service $nodeOperations
Результат Neos\Neos\Service\NodeOperations

$nodeSearchService защищенное свойство

protected NodeSearchService,Neos\Neos\Domain\Service $nodeSearchService
Результат Neos\Neos\Domain\Service\NodeSearchService

$nodeTypeManager защищенное свойство

protected NodeTypeManager,Neos\ContentRepository\Domain\Service $nodeTypeManager
Результат Neos\ContentRepository\Domain\Service\NodeTypeManager

$supportedMediaTypes защищенное свойство

protected array $supportedMediaTypes
Результат array

$view защищенное свойство

protected NodeView,Neos\Neos\Service\View $view
Результат Neos\Neos\Service\View\NodeView

$viewFormatToObjectNameMap защищенное свойство

protected array $viewFormatToObjectNameMap
Результат array