src/Sulu/Bundle/PageBundle/Preview/PageRouteDefaultsProvider.php
protected function documentToStructure(BasePageDocument $document)
    {
        $structure = $this->inspector->getStructureMetadata($document);
        $documentAlias = $this->inspector->getMetadata($document)->getAlias();

        $structureBridge = $this->structureManager->wrapStructure($documentAlias, $structure);
        $structureBridge->setDocument($document);

        return $structureBridge;
    }
protected function documentToStructure(BasePageDocument $document)
    {
        $structure = $this->inspector->getStructureMetadata($document);
        $documentAlias = $this->inspector->getMetadata($document)->getAlias();

        $structureBridge = $this->structureManager->wrapStructure($documentAlias, $structure);
        $structureBridge->setDocument($document);

        return $structureBridge;
    }
protected function documentToStructure ( BasePageDocument $ document ) { $ structure = $ this -> inspector -> getStructureMetadata ( $ document ) ; $ documentAlias = $ this -> inspector -> getMetadata ( $ document ) -> getAlias ( ) ; $ structureBridge = $ this -> structureManager -> wrapStructure ( $ documentAlias , $ structure ) ; $ structureBridge -> setDocument ( $ document ) ; return $ structureBridge ; }
Return a structure bridge corresponding to the given document.

@param BasePageDocument $document

@return PageBridge
Return a structure bridge corresponding to the given document .