Skip to content

Commit

Permalink
Revert "TASK: Add rudimentary support for EditPreviewModes in 9.0"
Browse files Browse the repository at this point in the history
This reverts commit ce395ca.
  • Loading branch information
mhsdesign committed Sep 16, 2023
1 parent 07b620a commit d0c743c
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,20 +132,7 @@ protected function renderContent(ControllerContext $controllerContext): string|R

if ($this->nodeDomAddress) {
$fusionView = new FusionView();

$fakeActionRequest = clone $controllerContext->getRequest();
$fakeActionRequest->setControllerPackageKey('Neos.Neos');
$fakeActionRequest->setControllerName('Frontend\\Node');
$fakeActionRequest->setControllerActionName('edit');

$fakeControllerContext = new ControllerContext(
$fakeActionRequest,
$controllerContext->getResponse(),
$controllerContext->getArguments(),
$controllerContext->getUriBuilder(),
);

$fusionView->setControllerContext($fakeControllerContext);
$fusionView->setControllerContext($controllerContext);

$fusionView->assign('value', $this->node);
$fusionView->setFusionPath($this->nodeDomAddress->getFusionPathForContentRendering());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,20 +178,7 @@ protected function renderContent(ControllerContext $controllerContext): string|R
$parentDomAddress = $this->getParentDomAddress();
if ($parentDomAddress) {
$fusionView = new FusionView();

$fakeActionRequest = clone $controllerContext->getRequest();
$fakeActionRequest->setControllerPackageKey('Neos.Neos');
$fakeActionRequest->setControllerName('Frontend\\Node');
$fakeActionRequest->setControllerActionName('edit');

$fakeControllerContext = new ControllerContext(
$fakeActionRequest,
$controllerContext->getResponse(),
$controllerContext->getArguments(),
$controllerContext->getUriBuilder(),
);

$fusionView->setControllerContext($fakeControllerContext);
$fusionView->setControllerContext($controllerContext);

$fusionView->assign('value', $parentNode);
$fusionView->setFusionPath($parentDomAddress->getFusionPath());
Expand Down
10 changes: 1 addition & 9 deletions Classes/Fusion/Helper/NodeInfoHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ protected function getUriInformation(Node $node, ControllerContext $controllerCo
if (!$node->nodeType->isOfType($this->documentNodeTypeRole)) {
return $nodeInfo;
}
$nodeInfo['uri'] = $this->editUri($node, $controllerContext);
$nodeInfo['uri'] = $this->previewUri($node, $controllerContext);
return $nodeInfo;
}

Expand Down Expand Up @@ -442,14 +442,6 @@ public function uri(Node|NodeAddress $nodeAddress, ControllerContext $controller
return (string)NodeUriBuilder::fromRequest($controllerContext->getRequest())->uriFor($nodeAddress);
}

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

public function previewUri(Node $node, ControllerContext $controllerContext): string
{
$contentRepository = $this->contentRepositoryRegistry->get($node->subgraphIdentity->contentRepositoryId);
Expand Down
2 changes: 1 addition & 1 deletion Configuration/Settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ Neos:
personalWorkspace: '${Neos.Ui.Workspace.getPersonalWorkspace(contentRepositoryId)}'
ui:
contentCanvas:
src: '${Neos.Ui.NodeInfo.editUri(documentNode, controllerContext)}'
src: '${Neos.Ui.NodeInfo.uri(documentNode, controllerContext)}'
backgroundColor: '${Configuration.setting(''Neos.Neos.Ui.contentCanvas.backgroundColor'')}'
debugMode: false
editPreviewMode: '${q(user).property("preferences.preferences")["contentEditing.editPreviewMode"] || Configuration.setting(''Neos.Neos.userInterface.defaultEditPreviewMode'')}'
Expand Down
3 changes: 0 additions & 3 deletions Tests/IntegrationTests/TestDistribution/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@
},
"extra": {
"patches": {
"neos/neos-development-collection": {
"FEATURE: Edit preview mode support for Neos 9": "https://github.com/neos/neos-development-collection/pull/4067.patch"
}
}
},
"repositories": {
Expand Down

0 comments on commit d0c743c

Please sign in to comment.