Skip to content

Commit

Permalink
Merge pull request neos#3703 from mhsdesign/task/avoidHeavilyUseOfCon…
Browse files Browse the repository at this point in the history
…trollerContext

TASK: Avoid heavily use of controller context and make `Neos.Ui.NodeInfo` internal
mhsdesign authored Feb 14, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
2 parents 13dccc9 + ce7cd45 commit 0d87792
Showing 14 changed files with 87 additions and 139 deletions.
6 changes: 3 additions & 3 deletions Classes/Controller/BackendController.php
Original file line number Diff line number Diff line change
@@ -198,17 +198,17 @@ public function indexAction(string $node = null)
),
'frontendConfiguration' =>
$this->frontendConfigurationProvider->getFrontendConfiguration(
controllerContext: $this->controllerContext,
actionRequest: $this->request,
),
'nodeTypes' =>
$this->nodeTypeGroupsAndRolesProvider->getNodeTypes(),
'menu' =>
$this->menuProvider->getMenu(
controllerContext: $this->controllerContext,
actionRequest: $this->request,
),
'initialState' =>
$this->initialStateProvider->getInitialState(
controllerContext: $this->controllerContext,
actionRequest: $this->request,
contentRepositoryId: $siteDetectionResult->contentRepositoryId,
documentNode: $node,
site: $siteNode,
6 changes: 3 additions & 3 deletions Classes/Controller/BackendServiceController.php
Original file line number Diff line number Diff line change
@@ -590,15 +590,15 @@ public function flowQueryAction(array $chain): string
$nodeInfoHelper = new NodeInfoHelper();
$type = $finisher['type'] ?? null;
$result = match ($type) {
'get' => $nodeInfoHelper->renderNodes(array_filter($flowQuery->get()), $this->getControllerContext()),
'get' => $nodeInfoHelper->renderNodes(array_filter($flowQuery->get()), $this->request),
'getForTree' => $nodeInfoHelper->renderNodes(
array_filter($flowQuery->get()),
$this->getControllerContext(),
$this->request,
true
),
'getForTreeWithParents' => $nodeInfoHelper->renderNodesWithParents(
array_filter($flowQuery->get()),
$this->getControllerContext()
$this->request
),
default => []
};
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@

namespace Neos\Neos\Ui\Domain\InitialData;

use Neos\Flow\Mvc\Controller\ControllerContext;
use Neos\Flow\Mvc\ActionRequest;

/**
* Reads and preprocesses the `Neos.Neos.Ui.frontendConfiguration` settings
@@ -27,6 +27,6 @@ interface FrontendConfigurationProviderInterface
{
/** @return array<mixed> */
public function getFrontendConfiguration(
ControllerContext $controllerContext
ActionRequest $actionRequest
): array;
}
4 changes: 2 additions & 2 deletions Classes/Domain/InitialData/InitialStateProviderInterface.php
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@

use Neos\ContentRepository\Core\Factory\ContentRepositoryId;
use Neos\ContentRepository\Core\Projection\ContentGraph\Node;
use Neos\Flow\Mvc\Controller\ControllerContext;
use Neos\Flow\Mvc\ActionRequest;
use Neos\Neos\Domain\Model\User;

/**
@@ -29,7 +29,7 @@ interface InitialStateProviderInterface
{
/** @return array<mixed> */
public function getInitialState(
ControllerContext $controllerContext,
ActionRequest $actionRequest,
ContentRepositoryId $contentRepositoryId,
?Node $documentNode,
?Node $site,
4 changes: 2 additions & 2 deletions Classes/Domain/InitialData/MenuProviderInterface.php
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@

namespace Neos\Neos\Ui\Domain\InitialData;

use Neos\Flow\Mvc\Controller\ControllerContext;
use Neos\Flow\Mvc\ActionRequest;

/**
* Retrieves all data needed to render the main burger menu located in the
@@ -27,5 +27,5 @@ interface MenuProviderInterface
/**
* @return array<int,array{label:string,icon:string,uri:string,target:string,children:array<int,array{icon:string,label:string,uri:string,position?:string,isActive:bool,target:string,skipI18n:bool}>}>
*/
public function getMenu(ControllerContext $controllerContext): array;
public function getMenu(ActionRequest $actionRequest): array;
}
Original file line number Diff line number Diff line change
@@ -80,7 +80,7 @@ public function serializePayload(ControllerContext $controllerContext): array

if ($documentNode) {
return [
'uri' => $nodeInfoHelper->previewUri($documentNode, $controllerContext)
'uri' => $nodeInfoHelper->previewUri($documentNode, $controllerContext->getRequest())
];
}

9 changes: 5 additions & 4 deletions Classes/Domain/Model/Feedback/Operations/UpdateNodeInfo.php
Original file line number Diff line number Diff line change
@@ -13,6 +13,7 @@

use Neos\ContentRepository\Core\Projection\ContentGraph\Filter\FindChildNodesFilter;
use Neos\ContentRepository\Core\Projection\ContentGraph\Node;
use Neos\Flow\Mvc\ActionRequest;
use Neos\Neos\FrontendRouting\NodeAddressFactory;
use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry;
use Neos\Flow\Annotations as Flow;
@@ -106,7 +107,7 @@ public function serializePayload(ControllerContext $controllerContext): array
{
return $this->node
? [
'byContextPath' => $this->serializeNodeRecursively($this->node, $controllerContext)
'byContextPath' => $this->serializeNodeRecursively($this->node, $controllerContext->getRequest())
]
: [];
}
@@ -116,7 +117,7 @@ public function serializePayload(ControllerContext $controllerContext): array
*
* @return array<string,?array<string,mixed>>
*/
private function serializeNodeRecursively(Node $node, ControllerContext $controllerContext): array
private function serializeNodeRecursively(Node $node, ActionRequest $actionRequest): array
{
$contentRepository = $this->contentRepositoryRegistry->get($node->subgraphIdentity->contentRepositoryId);
$nodeAddressFactory = NodeAddressFactory::create($contentRepository);
@@ -125,14 +126,14 @@ private function serializeNodeRecursively(Node $node, ControllerContext $control
$nodeAddressFactory->createFromNode($node)->serializeForUri()
=> $this->nodeInfoHelper->renderNodeWithPropertiesAndChildrenInformation(
$node,
$controllerContext
$actionRequest
)
];

if ($this->isRecursive === true) {
$subgraph = $this->contentRepositoryRegistry->subgraphForNode($node);
foreach ($subgraph->findChildNodes($node->nodeAggregateId, FindChildNodesFilter::create()) as $childNode) {
$result = array_merge($result, $this->serializeNodeRecursively($childNode, $controllerContext));
$result = array_merge($result, $this->serializeNodeRecursively($childNode, $actionRequest));
}
}

Original file line number Diff line number Diff line change
@@ -106,7 +106,7 @@ public function serializePayload(ControllerContext $controllerContext): array
$nodeInfoHelper = new NodeInfoHelper();
$contentRepository = $this->contentRepositoryRegistry->get($this->node->subgraphIdentity->contentRepositoryId);
$nodeAddressFactory = NodeAddressFactory::create($contentRepository);
$newPreviewUrl = $nodeInfoHelper->createRedirectToNode($this->node, $controllerContext);
$newPreviewUrl = $nodeInfoHelper->createRedirectToNode($this->node, $controllerContext->getRequest());
$contextPath = $nodeAddressFactory->createFromNode($this->node)->serializeForUri();
}
return [
146 changes: 38 additions & 108 deletions Classes/Fusion/Helper/NodeInfoHelper.php
Original file line number Diff line number Diff line change
@@ -14,13 +14,13 @@
use Neos\ContentRepository\Core\Projection\ContentGraph\Filter\CountAncestorNodesFilter;
use Neos\ContentRepository\Core\Projection\ContentGraph\Filter\FindChildNodesFilter;
use Neos\ContentRepository\Core\Projection\ContentGraph\Node;
use Neos\ContentRepository\Core\Projection\ContentGraph\Nodes;
use Neos\ContentRepository\Core\Projection\NodeHiddenState\NodeHiddenStateFinder;
use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateClassification;
use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry;
use Neos\Eel\ProtectedContextAwareInterface;
use Neos\Flow\Annotations as Flow;
use Neos\Flow\Mvc\Controller\ControllerContext;
use Neos\Flow\Mvc\ActionRequest;
use Neos\Flow\Mvc\Routing\UriBuilder;
use Neos\Flow\Persistence\PersistenceManagerInterface;
use Neos\Neos\FrontendRouting\NodeAddress;
use Neos\Neos\FrontendRouting\NodeAddressFactory;
@@ -30,6 +30,7 @@
use Neos\Neos\Utility\NodeTypeWithFallbackProvider;

/**
* @internal
* @Flow\Scope("singleton")
* @todo EEL helpers are still to be declared as internal
*/
@@ -76,36 +77,12 @@ class NodeInfoHelper implements ProtectedContextAwareInterface
*/
protected $ignoredNodeTypeRole;

/**
* @return ?array<string,mixed>
* @deprecated See methods with specific names for different behaviors
*/
public function renderNode(
Node $node,
ControllerContext $controllerContext = null,
bool $omitMostPropertiesForTreeState = false,
string $nodeTypeFilterOverride = null
):?array {
return ($omitMostPropertiesForTreeState
? $this->renderNodeWithMinimalPropertiesAndChildrenInformation(
$node,
$controllerContext,
$nodeTypeFilterOverride
)
: $this->renderNodeWithPropertiesAndChildrenInformation(
$node,
$controllerContext,
$nodeTypeFilterOverride
)
);
}

/**
* @return ?array<string,mixed>
*/
public function renderNodeWithMinimalPropertiesAndChildrenInformation(
Node $node,
ControllerContext $controllerContext = null,
ActionRequest $actionRequest = null,
string $nodeTypeFilterOverride = null
): ?array {
$contentRepository = $this->contentRepositoryRegistry->get($node->subgraphIdentity->contentRepositoryId);
@@ -132,8 +109,8 @@ public function renderNodeWithMinimalPropertiesAndChildrenInformation(
|| $node->getProperty('disableAfterDateTime') instanceof \DateTimeInterface,
];

if ($controllerContext !== null) {
$nodeInfo = array_merge($nodeInfo, $this->getUriInformation($node, $controllerContext));
if ($actionRequest !== null) {
$nodeInfo = array_merge($nodeInfo, $this->getUriInformation($node, $actionRequest));
}

$baseNodeType = $nodeTypeFilterOverride ?: $this->baseNodeType;
@@ -154,7 +131,7 @@ public function renderNodeWithMinimalPropertiesAndChildrenInformation(
*/
public function renderNodeWithPropertiesAndChildrenInformation(
Node $node,
ControllerContext $controllerContext = null,
ActionRequest $actionRequest = null,
string $nodeTypeFilterOverride = null
): ?array {
/** @todo implement custom node policy service
@@ -168,8 +145,8 @@ public function renderNodeWithPropertiesAndChildrenInformation(
$nodeInfo['properties'] = $this->nodePropertyConverterService->getPropertiesArray($node);
$nodeInfo['isFullyLoaded'] = true;

if ($controllerContext !== null) {
$nodeInfo = array_merge($nodeInfo, $this->getUriInformation($node, $controllerContext));
if ($actionRequest !== null) {
$nodeInfo = array_merge($nodeInfo, $this->getUriInformation($node, $actionRequest));
}

$baseNodeType = $nodeTypeFilterOverride ? $nodeTypeFilterOverride : $this->baseNodeType;
@@ -184,16 +161,15 @@ public function renderNodeWithPropertiesAndChildrenInformation(
* Get the "uri" and "previewUri" for the given node
*
* @param Node $node
* @param ControllerContext $controllerContext
* @return array<string,string>
*/
protected function getUriInformation(Node $node, ControllerContext $controllerContext): array
protected function getUriInformation(Node $node, ActionRequest $actionRequest): array
{
$nodeInfo = [];
if (!$this->getNodeType($node)->isOfType($this->documentNodeTypeRole)) {
return $nodeInfo;
}
$nodeInfo['uri'] = $this->previewUri($node, $controllerContext);
$nodeInfo['uri'] = $this->previewUri($node, $actionRequest);
return $nodeInfo;
}

@@ -276,24 +252,22 @@ protected function renderChildrenInformation(Node $node, string $nodeTypeFilterS
*/
public function renderNodes(
array $nodes,
ControllerContext $controllerContext,
ActionRequest $actionRequest,
bool $omitMostPropertiesForTreeState = false
): array {
$methodName = $omitMostPropertiesForTreeState
? 'renderNodeWithMinimalPropertiesAndChildrenInformation'
: 'renderNodeWithPropertiesAndChildrenInformation';
$mapper = function (Node $node) use ($controllerContext, $methodName) {
return $this->$methodName($node, $controllerContext);
$mapper = function (Node $node) use ($actionRequest, $omitMostPropertiesForTreeState) {
return $omitMostPropertiesForTreeState
? $this->renderNodeWithMinimalPropertiesAndChildrenInformation($node, $actionRequest)
: $this->renderNodeWithPropertiesAndChildrenInformation($node, $actionRequest);
};

return array_values(array_filter(array_map($mapper, $nodes)));
}

/**
* @param array<int,?array<string,mixed>> $nodes
* @return array<int,?array<string,mixed>>
*/
public function renderNodesWithParents(array $nodes, ControllerContext $controllerContext): array
public function renderNodesWithParents(array $nodes, ActionRequest $actionRequest): array
{
// For search operation we want to include all nodes, not respecting the "baseNodeType" setting
$baseNodeTypeOverride = $this->documentNodeTypeRole;
@@ -307,7 +281,7 @@ public function renderNodesWithParents(array $nodes, ControllerContext $controll
$renderedNodes[$node->nodeAggregateId->value]['matched'] = true;
} elseif ($renderedNode = $this->renderNodeWithMinimalPropertiesAndChildrenInformation(
$node,
$controllerContext,
$actionRequest,
$baseNodeTypeOverride
)) {
$renderedNode['matched'] = true;
@@ -329,7 +303,7 @@ public function renderNodesWithParents(array $nodes, ControllerContext $controll
} else {
$renderedParentNode = $this->renderNodeWithMinimalPropertiesAndChildrenInformation(
$parentNode,
$controllerContext,
$actionRequest,
$baseNodeTypeOverride
);
if ($renderedParentNode) {
@@ -349,85 +323,52 @@ public function renderNodesWithParents(array $nodes, ControllerContext $controll
return array_values($renderedNodes);
}

/**
* @param Node $documentNode
* @param ControllerContext $controllerContext
* @return array<string,mixed>>
*/
public function renderDocumentNodeAndChildContent(
Node $documentNode,
ControllerContext $controllerContext
): array {
return $this->renderNodeAndChildContent($documentNode, $controllerContext);
}

/**
* @return array<string,mixed>>
*/
protected function renderNodeAndChildContent(Node $node, ControllerContext $controllerContext): array
{
$reducer = function ($nodes, $node) use ($controllerContext) {
return array_merge($nodes, $this->renderNodeAndChildContent($node, $controllerContext));
};

$contentRepository = $this->contentRepositoryRegistry->get($node->subgraphIdentity->contentRepositoryId);
$nodeAddressFactory = NodeAddressFactory::create($contentRepository);

return array_reduce(
iterator_to_array($this->getChildNodes($node, $this->buildContentChildNodeFilterString())),
$reducer,
[
$nodeAddressFactory->createFromNode($node)->serializeForUri()
=> $this->renderNodeWithPropertiesAndChildrenInformation($node, $controllerContext)
]
);
}

/**
* @return array<string,array<string,mixed>|null>
*/
public function defaultNodesForBackend(
Node $site,
Node $documentNode,
ControllerContext $controllerContext
ActionRequest $actionRequest
): array {
// does not support multiple CRs here yet
$contentRepository = $this->contentRepositoryRegistry->get($site->subgraphIdentity->contentRepositoryId);
$nodeAddressFactory = NodeAddressFactory::create($contentRepository);

return [
($nodeAddressFactory->createFromNode($site)->serializeForUri())
=> $this->renderNodeWithPropertiesAndChildrenInformation($site, $controllerContext),
=> $this->renderNodeWithPropertiesAndChildrenInformation($site, $actionRequest),
($nodeAddressFactory->createFromNode($documentNode)->serializeForUri())
=> $this->renderNodeWithPropertiesAndChildrenInformation($documentNode, $controllerContext)
=> $this->renderNodeWithPropertiesAndChildrenInformation($documentNode, $actionRequest)
];
}

public function uri(Node|NodeAddress $nodeAddress, ControllerContext $controllerContext): string
public function uri(Node|NodeAddress $nodeAddress, ActionRequest $actionRequest): string
{
if ($nodeAddress instanceof Node) {
$contentRepository = $this->contentRepositoryRegistry->get($nodeAddress->subgraphIdentity->contentRepositoryId);
$nodeAddressFactory = NodeAddressFactory::create($contentRepository);
$nodeAddress = $nodeAddressFactory->createFromNode($nodeAddress);
}
return (string)NodeUriBuilder::fromRequest($controllerContext->getRequest())->uriFor($nodeAddress);
return (string)NodeUriBuilder::fromRequest($actionRequest)->uriFor($nodeAddress);
}

public function previewUri(Node $node, ControllerContext $controllerContext): string
public function previewUri(Node $node, ActionRequest $actionRequest): string
{
$contentRepository = $this->contentRepositoryRegistry->get($node->subgraphIdentity->contentRepositoryId);
$nodeAddressFactory = NodeAddressFactory::create($contentRepository);
$nodeAddress = $nodeAddressFactory->createFromNode($node);
return (string)NodeUriBuilder::fromRequest($controllerContext->getRequest())->previewUriFor($nodeAddress);
return (string)NodeUriBuilder::fromRequest($actionRequest)->previewUriFor($nodeAddress);
}

public function createRedirectToNode(Node $node, ControllerContext $controllerContext): string
public function createRedirectToNode(Node $node, ActionRequest $actionRequest): string
{
$contentRepository = $this->contentRepositoryRegistry->get($node->subgraphIdentity->contentRepositoryId);
$nodeAddressFactory = NodeAddressFactory::create($contentRepository);
$nodeAddress = $nodeAddressFactory->createFromNode($node);
return $controllerContext->getUriBuilder()
->reset()
$uriBuilder = new UriBuilder();
$uriBuilder->setRequest($actionRequest);
return $uriBuilder
->setCreateAbsoluteUri(true)
->setFormat('html')
->uriFor('redirectTo', ['node' => $nodeAddress->serializeForUri()], 'Backend', 'Neos.Neos.Ui');
@@ -475,24 +416,6 @@ protected function buildContentChildNodeFilterString(): string
);
}

private function getChildNodes(Node $node, string $nodeTypeFilterString): Nodes
{
$contentRepository = $this->contentRepositoryRegistry->get($node->subgraphIdentity->contentRepositoryId);

return $this->contentRepositoryRegistry->subgraphForNode($node)
->findChildNodes(
$node->nodeAggregateId,
FindChildNodesFilter::create(nodeTypes: $nodeTypeFilterString)
);
}

public function nodeAddress(Node $node): NodeAddress
{
$contentRepository = $this->contentRepositoryRegistry->get($node->subgraphIdentity->contentRepositoryId);
$nodeAddressFactory = NodeAddressFactory::create($contentRepository);
return $nodeAddressFactory->createFromNode($node);
}

public function serializedNodeAddress(Node $node): string
{
$contentRepository = $this->contentRepositoryRegistry->get($node->subgraphIdentity->contentRepositoryId);
@@ -506,6 +429,13 @@ public function serializedNodeAddress(Node $node): string
*/
public function allowsCallOfMethod($methodName)
{
return true;
// to control what is used in eel we maintain this list.
return in_array($methodName, [
'serializedNodeAddress',
'createRedirectToNode',
'renderNodeWithPropertiesAndChildrenInformation',
'defaultNodesForBackend',
'uri'
], true);
}
}
7 changes: 6 additions & 1 deletion Classes/Fusion/RenderConfigurationImplementation.php
Original file line number Diff line number Diff line change
@@ -13,6 +13,7 @@

use Neos\Flow\Annotations as Flow;
use Neos\Flow\Exception;
use Neos\Flow\Mvc\ActionRequest;
use Neos\Fusion\FusionObjects\AbstractFusionObject;
use Neos\Neos\Ui\Domain\Service\ConfigurationRenderingService;

@@ -59,7 +60,11 @@ public function evaluate()
{
$context = $this->getContext();
$pathToRender = $this->getPath();
$context['controllerContext'] = $this->getruntime()->getControllerContext();
$actionRequest = $this->getRuntime()->fusionGlobals->get('request');
if (!$actionRequest instanceof ActionRequest) {
throw new Exception('The request is expected to be an ActionRequest.', 1706639436);
}
$context['request'] = $actionRequest;

if (!isset($this->settings[$pathToRender])) {
throw new Exception('The path "Neos.Neos.Ui.' . $pathToRender . '" was not found in the settings.', 1458814468);
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
namespace Neos\Neos\Ui\Infrastructure\Configuration;

use Neos\Flow\Annotations as Flow;
use Neos\Flow\Mvc\Controller\ControllerContext;
use Neos\Flow\Mvc\ActionRequest;
use Neos\Neos\Ui\Domain\InitialData\FrontendConfigurationProviderInterface;
use Neos\Neos\Ui\Domain\Service\ConfigurationRenderingService;

@@ -33,11 +33,11 @@ final class FrontendConfigurationProvider implements FrontendConfigurationProvid
protected array $frontendConfigurationBeforeProcessing;

public function getFrontendConfiguration(
ControllerContext $controllerContext
ActionRequest $actionRequest
): array {
return $this->configurationRenderingService->computeConfiguration(
$this->frontendConfigurationBeforeProcessing,
['controllerContext' => $controllerContext]
['request' => $actionRequest]
);
}
}
6 changes: 3 additions & 3 deletions Classes/Infrastructure/Configuration/InitialStateProvider.php
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@
use Neos\ContentRepository\Core\Factory\ContentRepositoryId;
use Neos\ContentRepository\Core\Projection\ContentGraph\Node;
use Neos\Flow\Annotations as Flow;
use Neos\Flow\Mvc\Controller\ControllerContext;
use Neos\Flow\Mvc\ActionRequest;
use Neos\Neos\Domain\Model\User;
use Neos\Neos\Ui\Domain\InitialData\InitialStateProviderInterface;
use Neos\Neos\Ui\Domain\Service\ConfigurationRenderingService;
@@ -40,7 +40,7 @@ final class InitialStateProvider implements InitialStateProviderInterface
protected array $initialStateBeforeProcessing;

public function getInitialState(
ControllerContext $controllerContext,
ActionRequest $actionRequest,
ContentRepositoryId $contentRepositoryId,
?Node $documentNode,
?Node $site,
@@ -49,7 +49,7 @@ public function getInitialState(
return $this->configurationRenderingService->computeConfiguration(
$this->initialStateBeforeProcessing,
[
'controllerContext' => $controllerContext,
'request' => $actionRequest,
'contentRepositoryId' => $contentRepositoryId,
'documentNode' => $documentNode,
'site' => $site,
15 changes: 14 additions & 1 deletion Classes/Infrastructure/Neos/MenuProvider.php
Original file line number Diff line number Diff line change
@@ -15,7 +15,11 @@
namespace Neos\Neos\Ui\Infrastructure\Neos;

use Neos\Flow\Annotations as Flow;
use Neos\Flow\Mvc\ActionRequest;
use Neos\Flow\Mvc\ActionResponse;
use Neos\Flow\Mvc\Controller\Arguments;
use Neos\Flow\Mvc\Controller\ControllerContext;
use Neos\Flow\Mvc\Routing\UriBuilder;
use Neos\Neos\Controller\Backend\MenuHelper;
use Neos\Neos\Ui\Domain\InitialData\MenuProviderInterface;
use Neos\Utility\PositionalArraySorter;
@@ -29,8 +33,17 @@ final class MenuProvider implements MenuProviderInterface
#[Flow\Inject]
protected MenuHelper $menuHelper;

public function getMenu(ControllerContext $controllerContext): array
public function getMenu(ActionRequest $actionRequest): array
{
$uriBuilder = new UriBuilder();
$uriBuilder->setRequest($actionRequest);
$controllerContext = new ControllerContext(
$actionRequest,
new ActionResponse(),
new Arguments(),
$uriBuilder
);

$modulesForMenu = $this->menuHelper->buildModuleList($controllerContext);

$result = [];
9 changes: 4 additions & 5 deletions Configuration/Settings.yaml
Original file line number Diff line number Diff line change
@@ -109,19 +109,19 @@ Neos:
metaData:
documentNode: '${Neos.Ui.NodeInfo.serializedNodeAddress(documentNode)}'
siteNode: '${Neos.Ui.NodeInfo.serializedNodeAddress(site)}'
previewUrl: '${Neos.Ui.NodeInfo.createRedirectToNode(documentNode, controllerContext)}'
previewUrl: '${Neos.Ui.NodeInfo.createRedirectToNode(documentNode, request)}'
contentDimensions:
active: '${Neos.Ui.ContentDimensions.dimensionSpacePointArray(documentNode.subgraphIdentity.dimensionSpacePoint)}'
allowedPresets: '${Neos.Ui.Api.emptyArrayToObject(Neos.Ui.ContentDimensions.allowedPresetsByName(documentNode.subgraphIdentity.dimensionSpacePoint, documentNode.subgraphIdentity.contentRepositoryId))}'
documentNodeSerialization: '${Neos.Ui.NodeInfo.renderNodeWithPropertiesAndChildrenInformation(documentNode, controllerContext)}'
documentNodeSerialization: '${Neos.Ui.NodeInfo.renderNodeWithPropertiesAndChildrenInformation(documentNode, request)}'
initialState:
changes:
pending: { }
processing: { }
failed: { }
cr:
nodes:
byContextPath: '${Neos.Ui.NodeInfo.defaultNodesForBackend(site, documentNode, controllerContext)}'
byContextPath: '${Neos.Ui.NodeInfo.defaultNodesForBackend(site, documentNode, request)}'
siteNode: '${Neos.Ui.NodeInfo.serializedNodeAddress(site)}'
documentNode: '${Neos.Ui.NodeInfo.serializedNodeAddress(documentNode)}'
clipboard: '${clipboardNodes || []}'
@@ -134,7 +134,7 @@ Neos:
personalWorkspace: '${Neos.Ui.Workspace.getPersonalWorkspace(contentRepositoryId)}'
ui:
contentCanvas:
src: '${Neos.Ui.NodeInfo.uri(documentNode, controllerContext)}'
src: '${Neos.Ui.NodeInfo.uri(documentNode, request)}'
backgroundColor: '${Configuration.setting(''Neos.Neos.Ui.contentCanvas.backgroundColor'')}'
debugMode: false
editPreviewMode: '${q(user).property("preferences.preferences")["contentEditing.editPreviewMode"] || Configuration.setting(''Neos.Neos.userInterface.defaultEditPreviewMode'')}'
@@ -208,4 +208,3 @@ Neos:
Neos.Ui.Workspace: Neos\Neos\Ui\Fusion\Helper\WorkspaceHelper
Neos.Ui.StaticResources: Neos\Neos\Ui\Fusion\Helper\StaticResourcesHelper
Neos.Ui.PositionalArraySorter: Neos\Neos\Ui\Fusion\Helper\PositionalArraySorterHelper
Neos.Ui.NodeInfo: Neos\Neos\Ui\Fusion\Helper\NodeInfoHelper

0 comments on commit 0d87792

Please sign in to comment.