/** * {@inheritDoc} * * @api */ public function registerNodeTypes(array $definitions, $allowUpdate) { $nts = array(); // prepare them first (all or nothing) foreach ($definitions as $definition) { $nts[$definition->getName()] = $this->createNodeType($definition, $allowUpdate); } $this->objectManager->registerNodeTypes($definitions, $allowUpdate); // no need to fetch the node types as with cnd, we already have the def and can // now register them ourselves foreach ($nts as $nt) { $this->addNodeType($nt); } return new ArrayIterator($nts); }