src/Sulu/Component/Util/SuluNodeHelper.php
public function getBaseSnippetUuid($type = null)
    {
        try {
            return $this->session->getNode($this->getBaseSnippetPath($type))->getIdentifier();
        } catch (PathNotFoundException $e) {
            $snippetStructures = array_map(function(StructureMetadata $structureMetadata) {
                return $structureMetadata->getName();
            }, $this->structureMetadataFactory->getStructures('snippet'));

            if (in_array($type, $snippetStructures)) {
                return null;
            }

            throw new \InvalidArgumentException(sprintf(
                'Snippet type "%s" not available, available snippet types are: [%s]',
                $type,
                implode(', ', $snippetStructures)
            ));
        }
    }
public function getBaseSnippetUuid($type = null)
    {
        try {
            return $this->session->getNode($this->getBaseSnippetPath($type))->getIdentifier();
        } catch (PathNotFoundException $e) {
            $snippetStructures = array_map(function(StructureMetadata $structureMetadata) {
                return $structureMetadata->getName();
            }, $this->structureMetadataFactory->getStructures('snippet'));

            if (in_array($type, $snippetStructures)) {
                return null;
            }

            throw new \InvalidArgumentException(sprintf(
                'Snippet type "%s" not available, available snippet types are: [%s]',
                $type,
                implode(', ', $snippetStructures)
            ));
        }
    }
public function getBaseSnippetUuid ( $ type = null ) { try { return $ this -> session -> getNode ( $ this -> getBaseSnippetPath ( $ type ) ) -> getIdentifier ( ) ; } catch ( PathNotFoundException $ e ) { $ snippetStructures = array_map ( function ( StructureMetadata $ structureMetadata ) { return $ structureMetadata -> getName ( ) ; } , $ this -> structureMetadataFactory -> getStructures ( 'snippet' ) ) ; if ( in_array ( $ type , $ snippetStructures ) ) { return null ; } throw new \ InvalidArgumentException ( sprintf ( 'Snippet type "%s" not available, available snippet types are: [%s]' , $ type , implode ( ', ' , $ snippetStructures ) ) ) ; } }
Returns the uuid for the base snippet of the given type resp. of all types if not given.

@param string $type

@return string
Returns the uuid for the base snippet of the given type resp . of all types if not given .