src/Sulu/Component/Content/Document/Subscriber/ResourceSegmentSubscriber.php
private function getResourceSegmentProperty($document)
    {
        $structure = $this->documentInspector->getStructureMetadata($document);

        if (!$structure) {
            return;
        }

        $property = $structure->getPropertyByTagName('sulu.rlp');

        if (!$property) {
            throw new \RuntimeException(
                sprintf(
                    'Structure "%s" does not have a "sulu.rlp" tag which is required for documents implementing the ' .
                    'ResourceSegmentBehavior. In "%s"',
                    $structure->name,
                    $structure->resource
                )
            );
        }

        return $property;
    }
private function getResourceSegmentProperty($document)
    {
        $structure = $this->documentInspector->getStructureMetadata($document);

        if (!$structure) {
            return;
        }

        $property = $structure->getPropertyByTagName('sulu.rlp');

        if (!$property) {
            throw new \RuntimeException(
                sprintf(
                    'Structure "%s" does not have a "sulu.rlp" tag which is required for documents implementing the ' .
                    'ResourceSegmentBehavior. In "%s"',
                    $structure->name,
                    $structure->resource
                )
            );
        }

        return $property;
    }
private function getResourceSegmentProperty ( $ document ) { $ structure = $ this -> documentInspector -> getStructureMetadata ( $ document ) ; if ( ! $ structure ) { return ; } $ property = $ structure -> getPropertyByTagName ( 'sulu.rlp' ) ; if ( ! $ property ) { throw new \ RuntimeException ( sprintf ( 'Structure "%s" does not have a "sulu.rlp" tag which is required for documents implementing the ' . 'ResourceSegmentBehavior. In "%s"' , $ structure -> name , $ structure -> resource ) ) ; } return $ property ; }
Returns the property of the document's structure containing the ResourceSegment.

@param $document

@return PropertyMetadata
Returns the property of the document s structure containing the ResourceSegment .