Neos\Neos\Service\PluginService::getPluginViewDefinitionsByPluginNodeType PHP Method

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
    public function getPluginViewDefinitionsByPluginNodeType(NodeType $pluginNodeType)
    {
        $viewDefinitions = [];
        foreach ($this->getPluginViewConfigurationsByPluginNodeType($pluginNodeType) as $pluginViewName => $pluginViewConfiguration) {
            $viewDefinitions[] = new PluginViewDefinition($pluginNodeType, $pluginViewName, $pluginViewConfiguration);
        }
        return $viewDefinitions;
    }

Usage Example

 /**
  * Returns the processed Configuration
  *
  * @param \Neos\ContentRepository\Domain\Model\NodeType $nodeType (uninitialized) The node type to process
  * @param array $configuration input configuration
  * @param array $options The processor options
  * @return void
  */
 public function process(NodeType $nodeType, array &$configuration, array $options)
 {
     $pluginViewDefinitions = $this->pluginService->getPluginViewDefinitionsByPluginNodeType($nodeType);
     if ($pluginViewDefinitions === array()) {
         return;
     }
     $configuration['ui']['inspector']['groups']['pluginViews'] = array('position' => '9999', 'label' => 'Plugin Views');
     $configuration['properties']['views'] = array('type' => 'string', 'ui' => array('inspector' => array('group' => 'pluginViews', 'position' => '20', 'editor' => 'Neos.Neos/Inspector/Editors/PluginViewsEditor')));
 }
All Usage Examples Of Neos\Neos\Service\PluginService::getPluginViewDefinitionsByPluginNodeType