Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Classes/Application/ReloadNodes/NodeMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,6 @@ public function jsonSerialize(): mixed
$result[$item->getNodeAddressAsString()] = $item;
}

return $result ? $result : new \stdClass;
return $result ? $result : new \stdClass();
}
}
13 changes: 8 additions & 5 deletions Classes/Application/ReloadNodes/ReloadNodesQueryHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ public function handle(ReloadNodesQuery $query, ActionRequest $actionRequest): R
$ancestors,
$subgraph
) {
if ($level < $this->loadingDepth || // load all nodes within loadingDepth
if (
$level < $this->loadingDepth || // load all nodes within loadingDepth
$this->loadingDepth === 0 || // unlimited loadingDepth
// load toggled nodes
$query->toggledNodesIds->contain($baseNode->aggregateId) ||
Expand All @@ -119,10 +120,12 @@ public function handle(ReloadNodesQuery $query, ActionRequest $actionRequest): R
iterator_to_array($ancestors)
))
) {
foreach ($subgraph->findChildNodes(
$baseNode->aggregateId,
FindChildNodesFilter::create(nodeTypes: $baseNodeTypeConstraints)
) as $childNode) {
foreach (
$subgraph->findChildNodes(
$baseNode->aggregateId,
FindChildNodesFilter::create(nodeTypes: $baseNodeTypeConstraints)
) as $childNode
) {
$nodeMapBuilder->addNode($childNode);
$gatherNodesRecursively($nodeMapBuilder, $childNode, $level + 1);
}
Expand Down
1 change: 1 addition & 0 deletions Classes/ContentRepository/Service/NeosUiNodeService.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace Neos\Neos\Ui\ContentRepository\Service;

/*
Expand Down
2 changes: 2 additions & 0 deletions Classes/Controller/BackendController.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Neos\Neos\Ui\Controller;

/*
Expand Down
1 change: 1 addition & 0 deletions Classes/Domain/Model/AbstractChange.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace Neos\Neos\Ui\Domain\Model;

/*
Expand Down
1 change: 1 addition & 0 deletions Classes/Domain/Model/ChangeCollection.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace Neos\Neos\Ui\Domain\Model;

/*
Expand Down
1 change: 1 addition & 0 deletions Classes/Domain/Model/ChangeInterface.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);

namespace Neos\Neos\Ui\Domain\Model;
Expand Down
8 changes: 6 additions & 2 deletions Classes/Domain/Model/Changes/AbstractCreate.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Neos\Neos\Ui\Domain\Model\Changes;

/*
Expand Down Expand Up @@ -195,8 +197,10 @@ protected function applyNodeCreationHandlers(
NodeType $nodeType,
ContentRepository $contentRepository
): NodeCreationCommands {
if (!isset($nodeType->getOptions()['nodeCreationHandlers'])
|| !is_array($nodeType->getOptions()['nodeCreationHandlers'])) {
if (
!isset($nodeType->getOptions()['nodeCreationHandlers'])
|| !is_array($nodeType->getOptions()['nodeCreationHandlers'])
) {
return $commands;
}
foreach ((new PositionalArraySorter($nodeType->getOptions()['nodeCreationHandlers']))->toArray() as $key => $nodeCreationHandlerConfiguration) {
Expand Down
11 changes: 8 additions & 3 deletions Classes/Domain/Model/Changes/AbstractStructuralChange.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Neos\Neos\Ui\Domain\Model\Changes;

/*
Expand Down Expand Up @@ -140,13 +142,16 @@ protected function finish(Node $node)

$this->updateWorkspaceInfo();

if ($this->getNodeType($node)?->isOfType('Neos.Neos:Content')
&& ($this->getParentDomAddress() || $this->getSiblingDomAddress())) {
if (
$this->getNodeType($node)?->isOfType('Neos.Neos:Content')
&& ($this->getParentDomAddress() || $this->getSiblingDomAddress())
) {
// we can ONLY render out of band if:
// 1) the parent of our new (or copied or moved) node is a ContentCollection;
// so we can directly update an element of this content collection

if ($parentNode && $this->getNodeType($parentNode)?->isOfType('Neos.Neos:ContentCollection') &&
if (
$parentNode && $this->getNodeType($parentNode)?->isOfType('Neos.Neos:ContentCollection') &&
// 2) the parent DOM address (i.e. the closest RENDERED node in DOM is actually the ContentCollection;
// and no other node in between
$this->getParentDomAddress() &&
Expand Down
2 changes: 2 additions & 0 deletions Classes/Domain/Model/Changes/CopyAfter.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Neos\Neos\Ui\Domain\Model\Changes;

/*
Expand Down
5 changes: 4 additions & 1 deletion Classes/Domain/Model/Changes/CopyBefore.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Neos\Neos\Ui\Domain\Model\Changes;

/*
Expand Down Expand Up @@ -59,7 +61,8 @@ public function apply(): void
? $this->findParentNode($succeedingSibling)
: null;
$subject = $this->subject;
if ($this->canApply() && !is_null($succeedingSibling)
if (
$this->canApply() && !is_null($succeedingSibling)
&& !is_null($parentNodeOfSucceedingSibling)
) {
if (!$subject->dimensionSpacePoint->equals($succeedingSibling->dimensionSpacePoint)) {
Expand Down
2 changes: 2 additions & 0 deletions Classes/Domain/Model/Changes/Create.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Neos\Neos\Ui\Domain\Model\Changes;

/*
Expand Down
2 changes: 2 additions & 0 deletions Classes/Domain/Model/Changes/CreateAfter.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Neos\Neos\Ui\Domain\Model\Changes;

/*
Expand Down
2 changes: 2 additions & 0 deletions Classes/Domain/Model/Changes/CreateBefore.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Neos\Neos\Ui\Domain\Model\Changes;

/*
Expand Down
5 changes: 4 additions & 1 deletion Classes/Domain/Model/Changes/MoveAfter.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Neos\Neos\Ui\Domain\Model\Changes;

/*
Expand Down Expand Up @@ -56,7 +58,8 @@ public function apply(): void
// "subject" is the to-be-moved node
$subject = $this->subject;
$parentNode = $this->findParentNode($this->subject);
if ($this->canApply()
if (
$this->canApply()
&& !is_null($precedingSibling)
&& !is_null($parentNodeOfPreviousSibling)
&& !is_null($parentNode)
Expand Down
5 changes: 4 additions & 1 deletion Classes/Domain/Model/Changes/MoveBefore.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Neos\Neos\Ui\Domain\Model\Changes;

/*
Expand Down Expand Up @@ -53,7 +55,8 @@ public function apply(): void
$subject = $this->subject;
$parentNode = $this->findParentNode($subject);
$succeedingSiblingParent = $succeedingSibling ? $this->findParentNode($succeedingSibling) : null;
if ($this->canApply() && !is_null($succeedingSibling)
if (
$this->canApply() && !is_null($succeedingSibling)
&& !is_null($parentNode) && !is_null($succeedingSiblingParent)
) {
$precedingSibling = null;
Expand Down
2 changes: 2 additions & 0 deletions Classes/Domain/Model/Changes/MoveInto.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Neos\Neos\Ui\Domain\Model\Changes;

/*
Expand Down
14 changes: 10 additions & 4 deletions Classes/Domain/Model/Changes/Property.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Neos\Neos\Ui\Domain\Model\Changes;

/*
Expand Down Expand Up @@ -192,17 +194,20 @@ private function createFeedback(Node $subject): void

$reloadIfChangedConfigurationPathForProperty = sprintf('properties.%s.ui.reloadIfChanged', $propertyName);
$reloadIfChangedConfigurationPathForReference = sprintf('references.%s.ui.reloadIfChanged', $propertyName);
if (!$this->getIsInline()
if (
!$this->getIsInline()
&& (
$this->getNodeType($node)?->getConfiguration($reloadIfChangedConfigurationPathForProperty)
|| $this->getNodeType($node)?->getConfiguration($reloadIfChangedConfigurationPathForReference)
)
) {
if (!$this->getNodeDomAddress()) {
$this->reloadDocument($node);
} elseif ($this->getNodeDomAddress()->getFusionPath()
} elseif (
$this->getNodeDomAddress()->getFusionPath()
&& $parentNode
&& $this->getNodeType($parentNode)?->isOfType('Neos.Neos:ContentCollection')) {
&& $this->getNodeType($parentNode)?->isOfType('Neos.Neos:ContentCollection')
) {
$reloadContentOutOfBand = new ReloadContentOutOfBand();
$reloadContentOutOfBand->setNode($node);
$reloadContentOutOfBand->setNodeDomAddress($this->getNodeDomAddress());
Expand All @@ -214,7 +219,8 @@ private function createFeedback(Node $subject): void

$reloadPageIfChangedConfigurationPathForProperty = sprintf('properties.%s.ui.reloadPageIfChanged', $propertyName);
$reloadPageIfChangedConfigurationPathForReference = sprintf('references.%s.ui.reloadPageIfChanged', $propertyName);
if (!$this->getIsInline()
if (
!$this->getIsInline()
&& (
$this->getNodeType($node)?->getConfiguration($reloadPageIfChangedConfigurationPathForProperty)
|| $this->getNodeType($node)?->getConfiguration($reloadPageIfChangedConfigurationPathForReference)
Expand Down
2 changes: 2 additions & 0 deletions Classes/Domain/Model/Changes/Remove.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Neos\Neos\Ui\Domain\Model\Changes;

/*
Expand Down
1 change: 1 addition & 0 deletions Classes/Domain/Model/Feedback/AbstractMessageFeedback.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace Neos\Neos\Ui\Domain\Model\Feedback;

/*
Expand Down
1 change: 1 addition & 0 deletions Classes/Domain/Model/Feedback/Messages/Error.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace Neos\Neos\Ui\Domain\Model\Feedback\Messages;

/*
Expand Down
1 change: 1 addition & 0 deletions Classes/Domain/Model/Feedback/Messages/Info.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace Neos\Neos\Ui\Domain\Model\Feedback\Messages;

/*
Expand Down
1 change: 1 addition & 0 deletions Classes/Domain/Model/Feedback/Messages/Success.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace Neos\Neos\Ui\Domain\Model\Feedback\Messages;

/*
Expand Down
1 change: 1 addition & 0 deletions Classes/Domain/Model/Feedback/Messages/Warning.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace Neos\Neos\Ui\Domain\Model\Feedback\Messages;

/*
Expand Down
1 change: 1 addition & 0 deletions Classes/Domain/Model/Feedback/Operations/NodeCreated.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace Neos\Neos\Ui\Domain\Model\Feedback\Operations;

/*
Expand Down
1 change: 1 addition & 0 deletions Classes/Domain/Model/Feedback/Operations/Redirect.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace Neos\Neos\Ui\Domain\Model\Feedback\Operations;

use Neos\ContentRepository\Core\Projection\ContentGraph\Node;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace Neos\Neos\Ui\Domain\Model\Feedback\Operations;

/*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace Neos\Neos\Ui\Domain\Model\Feedback\Operations;

/*
Expand Down
1 change: 1 addition & 0 deletions Classes/Domain/Model/Feedback/Operations/RemoveNode.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace Neos\Neos\Ui\Domain\Model\Feedback\Operations;

/*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace Neos\Neos\Ui\Domain\Model\Feedback\Operations;

/*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace Neos\Neos\Ui\Domain\Model\Feedback\Operations;

/*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace Neos\Neos\Ui\Domain\Model\Feedback\Operations;

/*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace Neos\Neos\Ui\Domain\Model\Feedback\Operations;

/*
Expand Down
1 change: 1 addition & 0 deletions Classes/Domain/Model/FeedbackCollection.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace Neos\Neos\Ui\Domain\Model;

/*
Expand Down
1 change: 1 addition & 0 deletions Classes/Domain/Model/FeedbackInterface.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace Neos\Neos\Ui\Domain\Model;

/*
Expand Down
1 change: 1 addition & 0 deletions Classes/Domain/Model/ReferencingChangeInterface.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace Neos\Neos\Ui\Domain\Model;

/*
Expand Down
1 change: 1 addition & 0 deletions Classes/Domain/Model/RenderedNodeDomAddress.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace Neos\Neos\Ui\Domain\Model;

/*
Expand Down
2 changes: 2 additions & 0 deletions Classes/Domain/NodeCreation/NodeCreationCommands.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Neos\Neos\Ui\Domain\NodeCreation;

/*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace Neos\Neos\Ui\Domain\NodeCreation;

/*
Expand Down
1 change: 1 addition & 0 deletions Classes/Domain/Service/ConfigurationRenderingService.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace Neos\Neos\Ui\Domain\Service;

/*
Expand Down
Loading
Loading