public isDocument ( TYPO3\TYPO3CR\Domain\Model\NodeInterface $node ) : boolean | ||
$node | TYPO3\TYPO3CR\Domain\Model\NodeInterface | The node to check |
리턴 | boolean | A boolean which indicates if the given node is a document node. |
public function isDocument(NodeInterface $node)
{
return $this->getClosestDocument($node) === $node;
}
/** * Inform the client that a node has been created, the client decides if and which tree should react to this change. * * @return void */ protected function addDocumentNodeCreatedFeedback() { $nodeService = new NodeService(); $node = $nodeService->getClosestDocument($this->getSubject()); if ($nodeService->isDocument($node)) { $documentNodeCreated = new DocumentNodeCreated(); $documentNodeCreated->setDocumentNode($node); $this->feedbackCollection->add($documentNodeCreated); } }