ActionButton
The actionButton tag represents a ActionColumn. It is used within the actionColumn tag.
Parameters
The actionButton tag adds a parameter to the ActionButton parameters; the name of the button. It can be specified as a named parameter – name:
– or be the first parameter. It is used as the key of the buttons array in the column definition.
All other parameters are the same as for ActionButton, and are specified in the same way, i.e. in order and/or as named parameters, and accept the same types.
Usage
Note the actionButton tags.
The first and second use positional parameters.
The second shows that the button name and content need not be the same.
The third uses named parameters.
{varType Yiisoft\Data\Reader\ReadableDataInterface $dataReader}
{gridView $dataReader|header: 'Users'}
{serialColumn}
{dataColumn 'id'}
{dataColumn 'username'}
{dataColumn 'email'}
{dataColumn 'created_at'}
{checkboxColumn}
{radioColumn}
{actionColumn}
{actionButton 'view', 'View'}
{actionButton 'update', 'Edit'}
{actionButton content: 'Delete', name: 'delete}
{/actionColumn}
{/gridView}
Last modified: 18 May 2025