grid\ActionColumn initDefaultButtons()

initDefaultButtons() protected method Initializes the default button rendering callbacks. protected void initDefaultButtons ( )

grid\ActionColumn initDefaultButton()

initDefaultButton() protected method (available since version 2.0.11) Initializes the default button rendering callback for single button protected void initDefaultButton ( $name, $iconName, $additionalOptions = [] )$name string Button name as it's written in template $iconName string The part of Bootstrap glyphicon class that makes it unique $additionalOptions array Array of additional options

grid\ActionColumn init()

init() public method Initializes the object. This method is invoked at the end of the constructor after the object is initialized with the given configuration. public void init ( )

grid\ActionColumn createUrl()

createUrl() public method Creates a URL for the given action and model. This method is called for each button and each row. public string createUrl ( $action, $model, $key, $index )$action string The button name (or action ID) $model yii\db\ActiveRecord The data model $key mixed The key associated with the data model $index integer The current row index return string The created URL

grid\ActionColumn $visibleButtons

$visibleButtons public property (available since version 2.0.7) Visibility conditions for each button. The array keys are the button names (without curly brackets), and the values are the boolean true/false or the anonymous function. When the button name is not specified in this array it will be shown by default. The callbacks must use the following signature: function ($model, $key, $index) { return $model->status === 'editable'; } Or you can pass a boolean value: [ 'update' =&

grid\ActionColumn $urlCreator

$urlCreator public property A callback that creates a button URL using the specified model information. The signature of the callback should be the same as that of createUrl() Since 2.0.10 it can accept additional parameter, which refers to the column instance itself: function (string $action, mixed $model, mixed $key, integer $index, ActionColumn $this) { //return string; } If this property is not set, button URLs will be created using createUrl(). public callable $urlCreator = null

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

grid\ActionColumn $headerOptions

$headerOptions public property The HTML attributes for the header cell tag. The HTML attributes for the header cell tag. public array $headerOptions = ['class' => 'action-column']

grid\ActionColumn $controller

$controller public property The ID of the controller that should handle the actions specified here. If not set, it will use the currently active controller. This property is mainly used by $urlCreator to create URLs for different actions. The value of this property will be prefixed to each action name to form the route of the action. public string $controller = null

grid\ActionColumn $buttons

$buttons public property Button rendering callbacks. The array keys are the button names (without curly brackets), and the values are the corresponding button rendering callbacks. The callbacks should use the following signature: function ($url, $model, $key) { // return the button HTML code } where $url is the URL that the column creates for the button, $model is the model object being rendered for the current row, and $key is the key of the model in the data provider array. You can a