src/Sulu/Component/Content/Metadata/PropertiesMetadata.php
public function getPropertyByTagName($tagName, $highest = true)
    {
        $properties = $this->getPropertiesByTagName($tagName);

        if (!$properties) {
            throw new \InvalidArgumentException(
                sprintf(
                    'No property with tag "%s" exists. In structure "%s" loaded from "%s"',
                    $tagName,
                    $this->name,
                    $this->resource
                )
            );
        }

        return reset($properties);
    }
public function getPropertyByTagName($tagName, $highest = true)
    {
        $properties = $this->getPropertiesByTagName($tagName);

        if (!$properties) {
            throw new \InvalidArgumentException(
                sprintf(
                    'No property with tag "%s" exists. In structure "%s" loaded from "%s"',
                    $tagName,
                    $this->name,
                    $this->resource
                )
            );
        }

        return reset($properties);
    }
public function getPropertyByTagName ( $ tagName , $ highest = true ) { $ properties = $ this -> getPropertiesByTagName ( $ tagName ) ; if ( ! $ properties ) { throw new \ InvalidArgumentException ( sprintf ( 'No property with tag "%s" exists. In structure "%s" loaded from "%s"' , $ tagName , $ this -> name , $ this -> resource ) ) ; } return reset ( $ properties ) ; }
Return true if the structure contains a property with the given
tag name.

@param string $tagName

@return PropertyMetadata
Return true if the structure contains a property with the given tag name .