grid\ActionColumn $template

$template public property

The template used for composing each cell in the action column. Tokens enclosed within curly brackets are treated as controller action IDs (also called button names in the context of action column). They will be replaced by the corresponding button rendering callbacks specified in $buttons. For example, the token {view} will be replaced by the result of the callback buttons['view']. If a callback cannot be found, the token will be replaced with an empty string.

As an example, to only have the view, and update button you can add the ActionColumn to your GridView columns as follows:

['class' => 'yii\grid\ActionColumn', 'template' => '{view} {update}'],

See also $buttons.

public string $template = '{view} {update} {delete}'
doc_Yii
2016-10-30 17:03:59
Comments
Leave a Comment

Please login to continue.