本文整理汇总了PHP中TYPO3\TYPO3CR\Domain\Model\NodeInterface::setNodeDataIsMatchingContext方法的典型用法代码示例。如果您正苦于以下问题:PHP NodeInterface::setNodeDataIsMatchingContext方法的具体用法?PHP NodeInterface::setNodeDataIsMatchingContext怎么用?PHP NodeInterface::setNodeDataIsMatchingContext使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TYPO3\TYPO3CR\Domain\Model\NodeInterface
的用法示例。
在下文中一共展示了NodeInterface::setNodeDataIsMatchingContext方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: moveNodeVariantToTargetWorkspace
/**
* 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);
}
示例2: moveNodeVariantToTargetWorkspace
/**
* 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();
$nodeData->setWorkspace($targetWorkspace);
$node->setNodeDataIsMatchingContext(NULL);
}