Get the "uri" and "previewUri" for the given node

@param NodeInterface $node
@param ControllerContext $controllerContext
@return array
433448
protected function getUriInformation(NodeInterface $node, ControllerContext $controllerContext): array
    {
        $nodeInfo = [];
        if (!$node->getNodeType()->isOfType($this->documentNodeTypeRole)) {
            return $nodeInfo;
        }

        try {
            $nodeInfo['uri'] = $this->createRedirectToNode($controllerContext, $node);
        } catch (\Neos\Flow\Mvc\Routing\Exception\MissingActionNameException $exception) {
            // Unless there is a serious problem with routes there shouldn't be an exception ever.
            $nodeInfo['uri'] = '';
        }

        return $nodeInfo;
    }
1046148
public function getNodeCanonical(NodeInterface $node) : ?string
    {
        if ($this->isNodeBlacklisted($node)) {
            return null;
        }

        $site = null;
        $alias = null;

        if ($this->shareCanonicalAcrossSites) {
            $storage = $this->siteManager->getStorage();

            // Very fist site is the right one for canonical URL
            if ($node->site_id) {
                $site = $storage->findOne($node->site_id);
                if ($site->getState() !== SiteState::ON) {
                    $site = null;
                }
            }
        }

        // If no site, fetch on the current site
        if (!$site) {
            if ($this->siteManager->hasContext()) {
                $site = $this->siteManager->getContext();
            }
        }

        if ($site) {
            $alias = $this->aliasManager->getPathAlias($node->id(), $site->getId());
        }

        if (!$alias) {
            // No alias at all means that the canonical is the node URL in the
            // current site, I am sorry I can't provide more any magic here...
            return url('node/' . $node->id(), ['absolute' => true]);
        }

        return $this->siteManager->getUrlGenerator()->generateUrl($site, $alias, ['absolute' => true], true);
    }
831004
public function createChildNodes(NodeInterface $node)
    {
        $nodeType = $node->getNodeType();
        foreach ($nodeType->getAutoCreatedChildNodes() as $childNodeName => $childNodeType) {
            try {
                $node->createNode($childNodeName, $childNodeType);
            } catch (NodeExistsException $exception) {
                // If you have a node that has been marked as removed, but is needed again
                // the old node is recovered
                $childNodePath = NodePaths::addNodePathSegment($node->getPath(), $childNodeName);
                $contextProperties = $node->getContext()->getProperties();
                $contextProperties['removedContentShown'] = true;
                $context = $this->contextFactory->create($contextProperties);
                $childNode = $context->getNode($childNodePath);
                if ($childNode->isRemoved()) {
                    $childNode->setRemoved(false);
                }
            }
        }
    }
609912
public function getPluginNodesWithViewDefinitions(ContentContext $context)
    {
        $pluginNodes = [];
        foreach ($this->getPluginNodes($context) as $pluginNode) {
            /** @var NodeInterface $pluginNode */
            if ($this->getPluginViewDefinitionsByPluginNodeType($pluginNode->getNodeType()) !== []) {
                $pluginNodes[] = $pluginNode;
            }
        }
        return $pluginNodes;
    }
161364
private function getExtensionData(
        NodeInterface $node,
        ExtensionInterface $extension,
        $propertyName,
        $webspaceKey,
        $locale
    ) {
        // extension data: load ones
        if (!$this->extensionDataCache->contains($extension->getName())) {
            $this->extensionDataCache->save(
                $extension->getName(),
                $this->loadExtensionData(
                    $node,
                    $extension,
                    $webspaceKey,
                    $locale
                )
            );
        }

        // get extension data from cache
        $data = $this->extensionDataCache->fetch($extension->getName());

        // if property exists set it to target (with default value '')
        return isset($data[$propertyName]) ? $data[$propertyName] : null;
    }
554325
public function getNodeSegment(NodeInterface $node) : ?string
    {
        if ($node->isNew()) {
            return null;
        }

        if ($this->isNodeBlacklisted($node)) {
            return null;
        }

        $map = $this->getNodeAliasMap([$node->id()]);

        if ($map) {
            return reset($map);
        }
    }
17543
public function serializePayload(ControllerContext $controllerContext)
    {
        return [
            'name' => $this->getWorkspace()->getName(),
            'publishableNodes' => $this->workspaceService->getPublishableNodeInfo(
                $this->getWorkspace()
            ),
            'baseWorkspace' => $this->getWorkspace()->getBaseWorkspace()->getName()
        ];
    }
480061
private static function extractProperties(NodeInterface $node)
    {
        $class = new \ReflectionClass($node);

        foreach ($class->getProperties() as $property) {
            if (!$property->isPublic()) {
                $property->setAccessible(true);
            }

            $name = $property->getName();
            $value = $property->getValue($node);

            yield $name => $value;

            if (!$property->isPublic()) {
                $property->setAccessible(false);
            }
        }
    }
901898
protected function generateNodeInfos(ReadNodeInterface $node, ReadSiteInterface $site)
    {
        $nodeInfos = array();

        try {
            $nodeInfos = array(
                'loc' => $this->router->generate(
                    $site->getMainAliasId() . '_' . $node->getId(),
                    array(),
                    UrlGeneratorInterface::ABSOLUTE_URL
                ),
                'lastmod' => $this->getLastModificationDate($node),
                'changefreq' => $this->getChangeFrequency($node, $site),
                'priority' => $this->getPriority($node, $site)
            );
        } catch (MissingMandatoryParametersException $e) {

        }

        return $nodeInfos;
    }
482832
public function searchAction(NodeInterface $node)
    {
        /* @var FusionView $view */
        $view = $this->view;
        $view->setFusionPath('ajaxSearch');
        $view->assign('value', $node);
    }
1346302
public function generateAutoNodeRoute(RoutableNodeInterface $node)
    {

        $repository = $this->manager->getRepository(AutoNodeRoute::class);

        $route = (new AutoNodeRoute())
            ->setRoute('/' . $this->slugify($node));

        //$node->addRoute($route);


        /**
         * @var Node $parent
         */
        while (!is_null($parent = $node->getParent())) {
            $route->setRoute($this->getAutoNodeRoute($parent) . $route->getRoute());
            $node = $parent;
        }

        // add increment if route exists
        $route->setRoute(
            $route->getRoute().$this->getIncrement($route->getRoute())
        );


        //var_dump($route->getRoute());

        return $route;
    }
1274007
protected function _actionRead(ControllerContext $context)
    {
        if(!$context->result instanceof ModelEntityInterface)
        {
            if($this->getModel()->getState()->isUnique())
            {
                $entity = $this->getModel()->fetch();

                if(!count($entity))
                {
                    $name   = ucfirst($this->getView()->getName());
                    throw new ControllerExceptionResourceNotFound($name.' Not Found');
                }
            }
            else $entity = $this->getModel()->create();
        }
        else $entity = $context->result;

        //Set the entity in the context
        $context->setEntity($entity);

        return $entity;
    }
592639
protected function getNodes(ReadBlockInterface $block)
    {
        $nodes = null;
        $nodeName = $block->getAttribute('nodeName');
        $siteId = $this->currentSiteManager->getSiteId();

        if (!is_null($nodeName)) {
            $nodes = $this->nodeRepository->getSubMenu($nodeName, $block->getAttribute('nbLevel'), $this->request->getLocale(), $siteId);
            $nodes = $this->getGrantedNodes($nodes);
        }

        return $nodes;
    }
117680
public function getContentDocument(TreeNodeInterface $node)
    {
        return $this->elementService->findLatestElementVersion($this->elementService->findElement($node->getTypeId()));
    }
1363937
public function serializePayload(ControllerContext $controllerContext)
    {
        return [
            'contextPath' => $this->getNode()->getContextPath(),
            'nodeDomAddress' => $this->getNodeDomAddress(),
            'renderedContent' => $this->renderContent($controllerContext)
        ];
    }
52122
public function indexAction(NodeInterface $node = null)
    {
        $this->session->start();
        $this->session->putData('__neosLegacyUiEnabled__', false);
        $user = $this->userService->getBackendUser();

        if ($user === null) {
            $this->redirectToUri($this->uriBuilder->uriFor('index', [], 'Login', 'Neos.Neos'));
        }

        if ($node === null) {
            $node = $this->findNodeToEdit();
        }

        $siteNode = $node->getContext()->getCurrentSiteNode();

        $this->view->assign('user', $user);
        $this->view->assign('documentNode', $node);
        $this->view->assign('site', $siteNode);
        $this->view->assign('clipboardNode', $this->clipboard->getNodeContextPath());
        $this->view->assign('clipboardMode', $this->clipboard->getMode());
        $this->view->assign('headScripts', $this->styleAndJavascriptInclusionService->getHeadScripts());
        $this->view->assign('headStylesheets', $this->styleAndJavascriptInclusionService->getHeadStylesheets());
        $this->view->assign('splashScreenPartial', $this->settings['splashScreen']['partial']);
        $this->view->assign('sitesForMenu', $this->menuHelper->buildSiteList($this->getControllerContext()));

        $this->view->assign('interfaceLanguage', $this->userService->getInterfaceLanguage());
    }
69953
public function convertUriToObject($uri, NodeInterface $contextNode = null)
    {
        if ($uri instanceof Uri) {
            $uri = (string)$uri;
        }

        if (preg_match(self::PATTERN_SUPPORTED_URIS, $uri, $matches) === 1) {
            switch ($matches[1]) {
                case 'node':
                    if ($contextNode === null) {
                        throw new \RuntimeException('node:// URI conversion requires a context node to be passed', 1409734235);
                    };

                    return $contextNode->getContext()->getNodeByIdentifier($matches[2]);
                case 'asset':
                    return $this->assetRepository->findByIdentifier($matches[2]);
            }
        }

        return null;
    }