Neos\ContentRepository\Domain\Service\NodeServiceInterface::cleanUpProperties PHP Method

cleanUpProperties() public method

Removes all properties not configured in the current Node Type.
public cleanUpProperties ( Neos\ContentRepository\Domain\Model\NodeInterface $node ) : void
$node Neos\ContentRepository\Domain\Model\NodeInterface
return void
    public function cleanUpProperties(NodeInterface $node);

Usage Example

コード例 #1
0
 /**
  * Move the given node instance to the target workspace
  *
  * If no target node variant (having the same dimension values) exists in the target workspace, the node that
  * is published will be used as a new node variant in the target workspace.
  *
  * @param NodeInterface $node The node to publish
  * @param Workspace $targetWorkspace The workspace to publish to
  * @return void
  */
 protected function moveNodeVariantToTargetWorkspace(NodeInterface $node, Workspace $targetWorkspace)
 {
     $nodeData = $node->getNodeData();
     $this->handleShadowNodeData($nodeData, $targetWorkspace, $nodeData);
     // Technically this shouldn't be needed but due to doctrines behavior we need it.
     if ($nodeData->isRemoved() && $targetWorkspace->getBaseWorkspace() === null) {
         $this->nodeDataRepository->remove($nodeData);
         return;
     }
     $nodeData->setMovedTo(null);
     $nodeData->setWorkspace($targetWorkspace);
     $nodeData->setLastPublicationDateTime($this->now);
     $node->setNodeDataIsMatchingContext(null);
     $this->nodeService->cleanUpProperties($node);
 }