public function getColumnsLabel($columns, $table)
    {
        /** @var \yii\db\ActiveRecord $model */
        $model = $this->_currentModel;
        /** @var Module $module */
        $module = $this->module;
        $attributeLabels = $model->attributeLabels();
        $relations = $module->tables[$table]['relations'];
        $columnsLabel = [];
        foreach ($columns as $attribute) {
            if (isset($attributeLabels[$attribute])) {
                $columnsLabel[] = $attributeLabels[$attribute];
            } elseif (isset($relations[$attribute]['label'])) {
                $columnsLabel[] = $relations[$attribute]['label'];
            } else {
                $columnsLabel[] = $attribute;
            }
        }

        return $columnsLabel;
    }
public function getColumnsLabel($columns, $table)
    {
        /** @var \yii\db\ActiveRecord $model */
        $model = $this->_currentModel;
        /** @var Module $module */
        $module = $this->module;
        $attributeLabels = $model->attributeLabels();
        $relations = $module->tables[$table]['relations'];
        $columnsLabel = [];
        foreach ($columns as $attribute) {
            if (isset($attributeLabels[$attribute])) {
                $columnsLabel[] = $attributeLabels[$attribute];
            } elseif (isset($relations[$attribute]['label'])) {
                $columnsLabel[] = $relations[$attribute]['label'];
            } else {
                $columnsLabel[] = $attribute;
            }
        }

        return $columnsLabel;
    }
public function getColumnsLabel ( $ columns , $ table ) { /** @var \yii\db\ActiveRecord $model */ $ model = $ this -> _currentModel ; /** @var Module $module */ $ module = $ this -> module ; $ attributeLabels = $ model -> attributeLabels ( ) ; $ relations = $ module -> tables [ $ table ] [ 'relations' ] ; $ columnsLabel = [ ] ; foreach ( $ columns as $ attribute ) { if ( isset ( $ attributeLabels [ $ attribute ] ) ) { $ columnsLabel [ ] = $ attributeLabels [ $ attribute ] ; } elseif ( isset ( $ relations [ $ attribute ] [ 'label' ] ) ) { $ columnsLabel [ ] = $ relations [ $ attribute ] [ 'label' ] ; } else { $ columnsLabel [ ] = $ attribute ; } } return $ columnsLabel ; }
Gets attributes label from current model

@param array $columns
@return array
Gets attributes label from current model