Skip to content

how about change the usernameField expression as a Column expression #479

@liyadongcn

Description

@liyadongcn

change the expression like this :
....
'usernameField' => ['attribute' => 'username','label' => 'User Name'],
....

it will easy to change the user name label just like the extraColumns.

i used the theme to change the view of assigment. You have to change the code like this in the view.
...
if (is_array($usernameField)){
// usernameField is an array
$userName = $model->{$usernameField['attribute']};
}else{
// usernameField is a string
$userName = $model->{$usernameField};
}
....

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions