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

This is only a proxy to the transport
См. также: NodeTypeManagerInterface::registerNodeTypesCnd
public registerNodeTypesCnd ( string $cnd, boolean $allowUpdate ) : boolean | Iterator
$cnd string a string with cnd information
$allowUpdate boolean whether to fail if node already exists or to update it
Результат boolean | Iterator true on success or \Iterator over the registered node types if repository is not able to process CND directly
Пример #1
0
 /**
  * {@inheritDoc}
  *
  * @api
  */
 public function registerNodeTypesCnd($cnd, $allowUpdate)
 {
     //set fetched from backend to false to allow to load the new types from backend
     $fetched = $this->fetchedAllFromBackend;
     $this->fetchedAllFromBackend = false;
     $this->objectManager->registerNodeTypesCnd($cnd, $allowUpdate);
     //parse out type names and fetch types to return definitions of the new nodes
     preg_match_all('/\\[([^\\]]*)\\]/', $cnd, $names);
     $types = array();
     foreach ($names[1] as $name) {
         $types[$name] = $this->getNodeType($name);
     }
     $this->fetchedAllFromBackend = $fetched;
     return $types;
 }