Browse Source

Update ActionColumn.php

Added content to give a clear example to those that don't intuitively know how to set the template property using array notation.

close #6811
tags/2.0.2
caboosesw 10 years ago committed by Carsten Brandt
parent
commit
f83ad4a05e
  1. 7
      framework/grid/ActionColumn.php

7
framework/grid/ActionColumn.php

@ -45,6 +45,13 @@ class ActionColumn extends Column
* 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 buttons
*/
public $template = '{view} {update} {delete}';

Loading…
Cancel
Save