PHP Class Neos\Neos\Service\PluginService

Whenever details about Plugins or PluginViews are needed this service should be used. For some methods the ContentContext has to be specified. This is required in order for the ContentRepository to fetch nodes of the current workspace. The context can be retrieved from any node of the correct workspace & tree. If no node is available (e.g. for CLI requests) the ContentContextFactory can be used to create a context instance.
Show file Open project: neos/neos-development-collection Class Usage Examples

Protected Properties

Property Type Description
$contentContextFactory Neos\Neos\Domain\Service\ContentContextFactory
$nodeDataRepository Neos\ContentRepository\Domain\Repository\NodeDataRepository
$nodeFactory Neos\ContentRepository\Domain\Factory\NodeFactory
$nodeTypeManager Neos\ContentRepository\Domain\Service\NodeTypeManager
$securityContext Neos\Flow\Security\Context

Public Methods

Method Description
getPluginNodeByAction ( Neos\ContentRepository\Domain\Model\NodeInterface $currentNode, string $controllerObjectName, string $actionName ) : Neos\ContentRepository\Domain\Model\NodeInterface returns a plugin node or one of it's view nodes if an view has been configured for that specific controller and action combination
getPluginNodes ( ContentContext $context ) : array Returns an array of all available plugin nodes
getPluginNodesWithViewDefinitions ( ContentContext $context ) : array Returns an array of all plugin nodes with View Definitions
getPluginViewDefinitionByAction ( string $controllerObjectName, string $actionName ) : PluginViewDefinition Fetch a PluginView definition that matches the specified controller and action combination
getPluginViewDefinitionsByPluginNodeType ( NodeType $pluginNodeType ) : array Get all configured PluginView definitions for a specific $pluginNodeType
getPluginViewNodeByMasterPlugin ( Neos\ContentRepository\Domain\Model\NodeInterface $node, string $viewName ) : Neos\ContentRepository\Domain\Model\NodeInterface returns a specific view node of an master plugin or NULL if it does not exist

Protected Methods

Method Description
getNodes ( array $nodeTypes, ContentContext $context ) : array Find all nodes of a specific node type
getPluginViewConfigurationsByPluginNodeType ( NodeType $pluginNodeType ) : array

Method Details

getNodes() protected method

Find all nodes of a specific node type
protected getNodes ( array $nodeTypes, ContentContext $context ) : array
$nodeTypes array
$context Neos\Neos\Domain\Service\ContentContext current content context, see class doc comment for details
return array

getPluginNodeByAction() public method

returns a plugin node or one of it's view nodes if an view has been configured for that specific controller and action combination
public getPluginNodeByAction ( Neos\ContentRepository\Domain\Model\NodeInterface $currentNode, string $controllerObjectName, string $actionName ) : Neos\ContentRepository\Domain\Model\NodeInterface
$currentNode Neos\ContentRepository\Domain\Model\NodeInterface
$controllerObjectName string
$actionName string
return Neos\ContentRepository\Domain\Model\NodeInterface

getPluginNodes() public method

Returns an array of all available plugin nodes
public getPluginNodes ( ContentContext $context ) : array
$context Neos\Neos\Domain\Service\ContentContext current content context, see class doc comment for details
return array

getPluginNodesWithViewDefinitions() public method

Returns an array of all plugin nodes with View Definitions
public getPluginNodesWithViewDefinitions ( ContentContext $context ) : array
$context Neos\Neos\Domain\Service\ContentContext
return array

getPluginViewConfigurationsByPluginNodeType() protected method

protected getPluginViewConfigurationsByPluginNodeType ( NodeType $pluginNodeType ) : array
$pluginNodeType Neos\ContentRepository\Domain\Model\NodeType
return array

getPluginViewDefinitionByAction() public method

Fetch a PluginView definition that matches the specified controller and action combination
public getPluginViewDefinitionByAction ( string $controllerObjectName, string $actionName ) : PluginViewDefinition
$controllerObjectName string
$actionName string
return Neos\Neos\Domain\Model\PluginViewDefinition

getPluginViewDefinitionsByPluginNodeType() public method

Get all configured PluginView definitions for a specific $pluginNodeType
public getPluginViewDefinitionsByPluginNodeType ( NodeType $pluginNodeType ) : array
$pluginNodeType Neos\ContentRepository\Domain\Model\NodeType node type name of the master plugin
return array

getPluginViewNodeByMasterPlugin() public method

returns a specific view node of an master plugin or NULL if it does not exist
public getPluginViewNodeByMasterPlugin ( Neos\ContentRepository\Domain\Model\NodeInterface $node, string $viewName ) : Neos\ContentRepository\Domain\Model\NodeInterface
$node Neos\ContentRepository\Domain\Model\NodeInterface
$viewName string
return Neos\ContentRepository\Domain\Model\NodeInterface

Property Details

$contentContextFactory protected property

protected ContentContextFactory,Neos\Neos\Domain\Service $contentContextFactory
return Neos\Neos\Domain\Service\ContentContextFactory

$nodeDataRepository protected property

protected NodeDataRepository,Neos\ContentRepository\Domain\Repository $nodeDataRepository
return Neos\ContentRepository\Domain\Repository\NodeDataRepository

$nodeFactory protected property

protected NodeFactory,Neos\ContentRepository\Domain\Factory $nodeFactory
return Neos\ContentRepository\Domain\Factory\NodeFactory

$nodeTypeManager protected property

protected NodeTypeManager,Neos\ContentRepository\Domain\Service $nodeTypeManager
return Neos\ContentRepository\Domain\Service\NodeTypeManager

$securityContext protected property

protected Context,Neos\Flow\Security $securityContext
return Neos\Flow\Security\Context