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;
 }