Pimcore\Model\Element\AbstractElement::getProperty PHP Метод

getProperty() публичный Метод

Get specific property data or the property object itself ($asContainer=true) by its name, if the property doesn't exists return null
public getProperty ( string $name, boolean $asContainer = false ) : mixed
$name string
$asContainer boolean
Результат mixed
    public function getProperty($name, $asContainer = false)
    {
        $properties = $this->getProperties();
        if ($this->hasProperty($name)) {
            if ($asContainer) {
                return $properties[$name];
            } else {
                return $properties[$name]->getData();
            }
        }
        return null;
    }