/** * Enables using the remove method when only setters are available * * @param boolean $removed If TRUE, this node and it's child nodes will be removed. If it is FALSE only this node will be restored. * @return void * @api */ public function setRemoved($removed) { if (!$this->isNodeDataMatchingContext()) { $this->materializeNodeData(); } if ((bool) $removed === true) { /** @var $childNode Node */ foreach ($this->getChildNodes() as $childNode) { $childNode->setRemoved(true); } $this->nodeData->setRemoved(true); $this->emitNodeRemoved($this); } else { $this->nodeData->setRemoved(false); $this->emitNodeUpdated($this); } $this->context->getFirstLevelNodeCache()->flush(); }
/** * Remove the given node * * @param NodeData $node * @return void */ public function execute(NodeData $node) { $node->setRemoved(true); }
/** * Remove the given node * * @param \TYPO3\TYPO3CR\Domain\Model\NodeData $node * @return void */ public function execute(\TYPO3\TYPO3CR\Domain\Model\NodeData $node) { $node->setRemoved(true); }