Neos\Neos\Ui\Domain\Model\Feedback\Operations\UpdateNodeInfo::setNode PHP Метод

setNode() публичный Метод

Set the node
public setNode ( TYPO3\TYPO3CR\Domain\Model\NodeInterface $node ) : void
$node TYPO3\TYPO3CR\Domain\Model\NodeInterface
Результат void
    public function setNode(NodeInterface $node)
    {
        $this->node = $node;
    }

Usage Example

Пример #1
0
 /**
  * Creates a new node beneath $parent
  *
  * @param  NodeInterface $parent
  * @return NodeInterface
  */
 protected function createNode(NodeInterface $parent)
 {
     $nodeType = $this->getNodeType();
     $name = $this->getName() ?: $this->nodeService->generateUniqueNodeName($parent->getPath());
     $node = $parent->createNode($name, $nodeType);
     $this->applyNodeCreationHandlers($node);
     $this->persistenceManager->persistAll();
     if ($nodeType->isOfType('TYPO3.Neos:Content') && ($this->getParentDomAddress() || $this->getSiblingDomAddress())) {
         if ($parent->getNodeType()->isOfType('TYPO3.Neos:ContentCollection')) {
             $renderContentOutOfBand = new RenderContentOutOfBand();
             $renderContentOutOfBand->setNode($node);
             $renderContentOutOfBand->setParentDomAddress($this->getParentDomAddress());
             $renderContentOutOfBand->setSiblingDomAddress($this->getSiblingDomAddress());
             $renderContentOutOfBand->setMode($this->getMode());
             $this->feedbackCollection->add($renderContentOutOfBand);
         } else {
             $flowQuery = new FlowQuery(array($node));
             $closestDocument = $flowQuery->closest('[instanceof TYPO3.Neos:Document]')->get(0);
             $reloadDocument = new ReloadDocument();
             $reloadDocument->setDocument($closestDocument);
             $this->feedbackCollection->add($reloadDocument);
         }
     }
     $updateNodeInfo = new UpdateNodeInfo();
     $updateNodeInfo->setNode($node);
     $this->feedbackCollection->add($updateNodeInfo);
     return $node;
 }