TbExtendedGridView::getAttribute PHP Метод

getAttribute() защищенный Метод

Helper function to get an attribute from the data
protected getAttribute ( CActiveRecord $data, string $attribute ) : mixed
$data CActiveRecord
$attribute string the attribute to get
Результат mixed the attribute value null if none found
    protected function getAttribute($data, $attribute)
    {
        if ($this->dataProvider instanceof CActiveDataProvider && $data->hasAttribute($attribute)) {
            return $data->{$attribute};
        }
        if ($this->dataProvider instanceof CArrayDataProvider || $this->dataProvider instanceof CSqlDataProvider) {
            if (is_object($data) && isset($data->{$attribute})) {
                return $data->{$attribute};
            }
            if (isset($data[$attribute])) {
                return $data[$attribute];
            }
        }
        return null;
    }