Neos.Neos/Classes/Controller/Backend/ContentController.php
public function pluginViewsAction($identifier = null, $workspaceName = 'live', array $dimensions = [])
    {
        $this->response->setHeader('Content-Type', 'application/json');

        $contentContext = $this->createContentContext($workspaceName, $dimensions);
        /** @var $node NodeInterface */
        $node = $contentContext->getNodeByIdentifier($identifier);

        $views = [];
        if ($node !== null) {
            /** @var $pluginViewDefinition PluginViewDefinition */
            $pluginViewDefinitions = $this->pluginService->getPluginViewDefinitionsByPluginNodeType($node->getNodeType());
            foreach ($pluginViewDefinitions as $pluginViewDefinition) {
                $label = $pluginViewDefinition->getLabel();

                $views[$pluginViewDefinition->getName()] = ['label' => $label];

                $pluginViewNode = $this->pluginService->getPluginViewNodeByMasterPlugin($node, $pluginViewDefinition->getName());
                if ($pluginViewNode === null) {
                    continue;
                }
                $q = new FlowQuery([$pluginViewNode]);
                $page = $q->closest('[instanceof Neos.Neos:Document]')->get(0);
                $uri = $this->uriBuilder
                    ->reset()
                    ->uriFor('show', ['node' => $page], 'Frontend\Node', 'Neos.Neos');
                $views[$pluginViewDefinition->getName()] = [
                    'label' => $label,
                    'pageNode' => [
                        'title' => $page->getLabel(),
                        'uri' => $uri
                    ]
                ];
            }
        }
        return json_encode((object) $views);
    }
public function pluginViewsAction($identifier = null, $workspaceName = 'live', array $dimensions = [])
    {
        $this->response->setHeader('Content-Type', 'application/json');

        $contentContext = $this->createContentContext($workspaceName, $dimensions);
        /** @var $node NodeInterface */
        $node = $contentContext->getNodeByIdentifier($identifier);

        $views = [];
        if ($node !== null) {
            /** @var $pluginViewDefinition PluginViewDefinition */
            $pluginViewDefinitions = $this->pluginService->getPluginViewDefinitionsByPluginNodeType($node->getNodeType());
            foreach ($pluginViewDefinitions as $pluginViewDefinition) {
                $label = $pluginViewDefinition->getLabel();

                $views[$pluginViewDefinition->getName()] = ['label' => $label];

                $pluginViewNode = $this->pluginService->getPluginViewNodeByMasterPlugin($node, $pluginViewDefinition->getName());
                if ($pluginViewNode === null) {
                    continue;
                }
                $q = new FlowQuery([$pluginViewNode]);
                $page = $q->closest('[instanceof Neos.Neos:Document]')->get(0);
                $uri = $this->uriBuilder
                    ->reset()
                    ->uriFor('show', ['node' => $page], 'Frontend\Node', 'Neos.Neos');
                $views[$pluginViewDefinition->getName()] = [
                    'label' => $label,
                    'pageNode' => [
                        'title' => $page->getLabel(),
                        'uri' => $uri
                    ]
                ];
            }
        }
        return json_encode((object) $views);
    }
public function pluginViewsAction ( $ identifier = null , $ workspaceName = 'live' , array $ dimensions = [ ] ) { $ this -> response -> setHeader ( 'Content-Type' , 'application/json' ) ; $ contentContext = $ this -> createContentContext ( $ workspaceName , $ dimensions ) ; /** @var $node NodeInterface */ $ node = $ contentContext -> getNodeByIdentifier ( $ identifier ) ; $ views = [ ] ; if ( $ node !== null ) { /** @var $pluginViewDefinition PluginViewDefinition */ $ pluginViewDefinitions = $ this -> pluginService -> getPluginViewDefinitionsByPluginNodeType ( $ node -> getNodeType ( ) ) ; foreach ( $ pluginViewDefinitions as $ pluginViewDefinition ) { $ label = $ pluginViewDefinition -> getLabel ( ) ; $ views [ $ pluginViewDefinition -> getName ( ) ] = [ 'label' => $ label ] ; $ pluginViewNode = $ this -> pluginService -> getPluginViewNodeByMasterPlugin ( $ node , $ pluginViewDefinition -> getName ( ) ) ; if ( $ pluginViewNode === null ) { continue ; } $ q = new FlowQuery ( [ $ pluginViewNode ] ) ; $ page = $ q -> closest ( '[instanceof Neos.Neos:Document]' ) -> get ( 0 ) ; $ uri = $ this -> uriBuilder -> reset ( ) -> uriFor ( 'show' , [ 'node' => $ page ] , 'Frontend\Node' , 'Neos.Neos' ) ; $ views [ $ pluginViewDefinition -> getName ( ) ] = [ 'label' => $ label , 'pageNode' => [ 'title' => $ page -> getLabel ( ) , 'uri' => $ uri ] ] ; } } return json_encode ( ( object ) $ views ) ; }
Fetch the configured views for the given master plugin

@param string $identifier Specifies the node to look up
@param string $workspaceName Name of the workspace to use for querying the node
@param array $dimensions Optional list of dimensions and their values which should be used for querying the specified node
@return string
Fetch the configured views for the given master plugin