Neos.ContentRepository/Classes/Domain/Model/Node.php
public function setRemoved($removed): void
    {
        if (!$this->isNodeDataMatchingContext()) {
            $this->materializeNodeData();
        }

        if ((boolean)$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();
    }
public function setRemoved($removed): void
    {
        if (!$this->isNodeDataMatchingContext()) {
            $this->materializeNodeData();
        }

        if ((boolean)$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();
    }
public function setRemoved ( $ removed ) : void { if ( ! $ this -> isNodeDataMatchingContext ( ) ) { $ this -> materializeNodeData ( ) ; } if ( ( boolean ) $ 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 ( ) ; }
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
@throws NodeException
@throws NodeTypeNotFoundException
@api
Enables using the remove method when only setters are available