Neos\Neos\Ui\Domain\Model\Changes\AbstractCreate::applyNodeCreationHandlers PHP Метод

applyNodeCreationHandlers() защищенный Метод

Apply nodeCreationHandlers
protected applyNodeCreationHandlers ( TYPO3\TYPO3CR\Domain\Model\NodeInterface $node ) : void
$node TYPO3\TYPO3CR\Domain\Model\NodeInterface
Результат void
    protected function applyNodeCreationHandlers(NodeInterface $node)
    {
        $data = $this->getData() ?: [];
        $nodeType = $node->getNodeType();
        if (isset($nodeType->getOptions()['nodeCreationHandlers'])) {
            $nodeCreationHandlers = $nodeType->getOptions()['nodeCreationHandlers'];
            if (is_array($nodeCreationHandlers)) {
                foreach ($nodeCreationHandlers as $nodeCreationHandlerConfiguration) {
                    $nodeCreationHandler = new $nodeCreationHandlerConfiguration['nodeCreationHandler']();
                    if (!$nodeCreationHandler instanceof NodeCreationHandlerInterface) {
                        throw new InvalidNodeCreationHandlerException(sprintf('Expected NodeCreationHandlerInterface but got "%s"', get_class($nodeCreationHandler)), 1364759956);
                    }
                    $nodeCreationHandler->handle($node, $data);
                }
            }
        }
    }