/**
  * Shows a list of nodes
  *
  * @param string $searchTerm An optional search term used for filtering the list of nodes
  * @param array $nodeIdentifiers An optional list of node identifiers
  * @param string $workspaceName Name of the workspace to search in, "live" by default
  * @param array $dimensions Optional list of dimensions and their values which should be used for querying
  * @param array $nodeTypes A list of node types the list should be filtered by
  * @param NodeInterface $contextNode a node to use as context for the search
  * @return string
  */
 public function indexAction($searchTerm = '', array $nodeIdentifiers = array(), $workspaceName = 'live', array $dimensions = array(), array $nodeTypes = array('Neos.Neos:Document'), NodeInterface $contextNode = null)
 {
     $searchableNodeTypeNames = array();
     foreach ($nodeTypes as $nodeTypeName) {
         if (!$this->nodeTypeManager->hasNodeType($nodeTypeName)) {
             $this->throwStatus(400, sprintf('Unknown node type "%s"', $nodeTypeName));
         }
         $searchableNodeTypeNames[$nodeTypeName] = $nodeTypeName;
         /** @var NodeType $subNodeType */
         foreach ($this->nodeTypeManager->getSubNodeTypes($nodeTypeName, false) as $subNodeTypeName => $subNodeType) {
             $searchableNodeTypeNames[$subNodeTypeName] = $subNodeTypeName;
         }
     }
     $contentContext = $this->createContentContext($workspaceName, $dimensions);
     if ($nodeIdentifiers === array()) {
         $nodes = $this->nodeSearchService->findByProperties($searchTerm, $searchableNodeTypeNames, $contentContext, $contextNode);
     } else {
         $nodes = array_map(function ($identifier) use($contentContext) {
             return $contentContext->getNodeByIdentifier($identifier);
         }, $nodeIdentifiers);
     }
     $this->view->assign('nodes', $nodes);
 }