Neos\Neos\Controller\Service\NodesController::showAction PHP Method

showAction() public method

Shows a specific node
public showAction ( string $identifier, string $workspaceName = 'live', array $dimensions = [] ) : string
$identifier string Specifies the node to look up
$workspaceName string Name of the workspace to use for querying the node
$dimensions array Optional list of dimensions and their values which should be used for querying the specified node
return string
    public function showAction($identifier, $workspaceName = 'live', array $dimensions = array())
    {
        $contentContext = $this->createContentContext($workspaceName, $dimensions);
        /** @var $node NodeInterface */
        $node = $contentContext->getNodeByIdentifier($identifier);
        if ($node === null) {
            $this->addExistingNodeVariantInformationToResponse($identifier, $contentContext);
            $this->throwStatus(404);
        }
        $convertedNodeProperties = $this->nodePropertyConverterService->getPropertiesArray($node);
        array_walk($convertedNodeProperties, function (&$value) {
            if (is_array($value)) {
                $value = json_encode($value);
            }
        });
        $this->view->assignMultiple(array('node' => $node, 'convertedNodeProperties' => $convertedNodeProperties));
    }