src/Sulu/Component/DocumentManager/NodeManager.php
public function createPath($path)
    {
        $current = $this->session->getRootNode();

        $segments = preg_split('#/#', $path, null, PREG_SPLIT_NO_EMPTY);
        foreach ($segments as $segment) {
            if ($current->hasNode($segment)) {
                $current = $current->getNode($segment);
            } else {
                $current = $current->addNode($segment);
                $current->addMixin('mix:referenceable');
                $current->setProperty('jcr:uuid', UUIDHelper::generateUUID());
            }
        }

        return $current;
    }
public function createPath($path)
    {
        $current = $this->session->getRootNode();

        $segments = preg_split('#/#', $path, null, PREG_SPLIT_NO_EMPTY);
        foreach ($segments as $segment) {
            if ($current->hasNode($segment)) {
                $current = $current->getNode($segment);
            } else {
                $current = $current->addNode($segment);
                $current->addMixin('mix:referenceable');
                $current->setProperty('jcr:uuid', UUIDHelper::generateUUID());
            }
        }

        return $current;
    }
public function createPath ( $ path ) { $ current = $ this -> session -> getRootNode ( ) ; $ segments = preg_split ( '#/#' , $ path , null , PREG_SPLIT_NO_EMPTY ) ; foreach ( $ segments as $ segment ) { if ( $ current -> hasNode ( $ segment ) ) { $ current = $ current -> getNode ( $ segment ) ; } else { $ current = $ current -> addNode ( $ segment ) ; $ current -> addMixin ( 'mix:referenceable' ) ; $ current -> setProperty ( 'jcr:uuid' , UUIDHelper :: generateUUID ( ) ) ; } } return $ current ; }
Create a path.

@param string $path

@return NodeInterface
Create a path .