src/Sulu/Component/Content/Document/Subscriber/StructureSubscriber.php
private function getDefaultStructureType(StructureBehavior $document)
    {
        $alias = $this->inspector->getMetadata($document)->getAlias();
        $webspace = $this->webspaceManager->findWebspaceByKey($this->inspector->getWebspace($document));

        if (!$webspace) {
            return $this->getDefaultStructureTypeFromConfig($alias);
        }

        return $webspace->getDefaultTemplate($alias);
    }
private function getDefaultStructureType(StructureBehavior $document)
    {
        $alias = $this->inspector->getMetadata($document)->getAlias();
        $webspace = $this->webspaceManager->findWebspaceByKey($this->inspector->getWebspace($document));

        if (!$webspace) {
            return $this->getDefaultStructureTypeFromConfig($alias);
        }

        return $webspace->getDefaultTemplate($alias);
    }
private function getDefaultStructureType ( StructureBehavior $ document ) { $ alias = $ this -> inspector -> getMetadata ( $ document ) -> getAlias ( ) ; $ webspace = $ this -> webspaceManager -> findWebspaceByKey ( $ this -> inspector -> getWebspace ( $ document ) ) ; if ( ! $ webspace ) { return $ this -> getDefaultStructureTypeFromConfig ( $ alias ) ; } return $ webspace -> getDefaultTemplate ( $ alias ) ; }
Return the default structure for the given StructureBehavior implementing document.

@param StructureBehavior $document

@return string
Return the default structure for the given StructureBehavior implementing document .