Sulu\Component\Content\Metadata\StructureMetadata::getProperty PHP Méthode

getProperty() public méthode

Return a model property.
See also: StructureMetadata::getProperties()
public getProperty ( string $name ) : PropertyMetadata
$name string
Résultat PropertyMetadata
    public function getProperty($name)
    {
        if (!isset($this->properties[$name])) {
            throw new \InvalidArgumentException(sprintf('Unknown model property "%s", in structure "%s". Known model properties: "%s". Loaded from "%s"', $name, $this->getName(), implode('", "', array_keys($this->properties)), $this->resource));
        }
        return $this->properties[$name];
    }

Usage Example

Exemple #1
0
 /**
  * {@inheritdoc}
  */
 public function getProperty($name)
 {
     if ($this->hasProperty($name)) {
         $property = $this->structure->getProperty($name);
     } else {
         $property = $this->structure->getChild($name);
     }
     return $this->createLegacyPropertyFromItem($property);
 }
All Usage Examples Of Sulu\Component\Content\Metadata\StructureMetadata::getProperty