src/widget/ActionColumn.php
protected function initDefaultButtons()
    {
        if (!isset($this->buttons['view'])) {
            $this->buttons['view'] = function ($url, $model) {
                return Html::tag('li',Html::a('<span class="fa fa-eye fa-lg"></span> '.Yii::t('yii', 'View'), $url, [
                    'title' => Yii::t('yii', 'View'),
                    'data-pjax' => '0',
                ]));
            };
        }
        if (!isset($this->buttons['update'])) {
            $this->buttons['update'] = function ($url, $model) {
                return Html::tag('li',Html::a('<span class="fa fa-edit fa-lg"></span> '.Yii::t('yii', 'Edit'), $url, [
                    'title' => Yii::t('yii', 'Edit'),
                    'data-pjax' => '0',
                ]));
            };
        }
        if (!isset($this->buttons['delete'])) {
            $this->buttons['delete'] = function ($url, $model) {
                return Html::tag('li',Html::a('<span class="fa fa-trash-o fa-lg"></span> '.Yii::t('yii', 'Delete'), $url, [
                    'title' => Yii::t('yii', 'Delete'),
                    'data-confirm' => Yii::t('yii', 'Are you sure you want to delete this item?'),
                    'data-method' => 'post',
                    'data-pjax' => '0',
                ]));
            };
        }
        
        if (!isset($this->buttons['restore'])) {
            $this->buttons['restore'] = function ($url, $model) {
                return Html::tag('li',Html::a('<span class="fa fa-undo fa-lg"></span> '.Yii::t('yii', 'Restore'), $url, [
                    'title' => Yii::t('yii', 'Restore'),
                    'data-pjax' => '0',
                ]));
            };
        }
        
        if (!isset($this->buttons['setpassword'])) {
            $this->buttons['setpassword'] = function ($url, $model) {
                return Html::tag('li',Html::a('<span class="fa fa-shield fa-lg"></span> '.Yii::t('yii', 'Set Password'), $url, [
                    'title' => Yii::t('yii', 'Set Password'),
                    'data-pjax' => '0',
                ]));
            };
        }
        
        if (!isset($this->buttons['changepass'])) {
            $this->buttons['changepass'] = function ($url, $model) {
                return Html::tag('li',Html::a('<span class="fa fa-shield fa-lg"></span> '.Yii::t('yii', 'Change Password'), $url, [
                    'title' => Yii::t('yii', 'Change Password'),
                    'data-pjax' => '0',
                ]));
            };
        }
        
        if (!isset($this->buttons['publish'])) {
            $this->buttons['publish'] = function ($url, $model) {
                if($model->state != AppActiveRecord::STATUS_PUBLISH){
                    return Html::tag('li',Html::a('<span class="fa fa-check-square-o fa-lg"></span> '.Yii::t('yii', 'Publish'), $url, [
                        'title' => Yii::t('yii', 'Publish'),
                        'data-pjax' => '0',
                        'data-method' => 'post',
                    ]));
                }else{
                    return '';
                }                
            };
        }
        
        if (!isset($this->buttons['unpublish'])) {
            $this->buttons['unpublish'] = function ($url, $model) {
                if($model->state != AppActiveRecord::STATUS_UNPUBLISH){
                    return Html::tag('li',Html::a('<span class="fa fa-minus-square-o fa-lg"></span> '.Yii::t('yii', 'Unpublish'), $url, [
                        'title' => Yii::t('yii', 'Unpublish'),
                        'data-pjax' => '0',
                        'data-method' => 'post',
                    ]));
                }else{
                    return '';
                }
            };
        }
        
        if (!isset($this->buttons['sendtopublish'])) {
            $this->buttons['sendtopublish'] = function ($url, $model) {
                if($model->state != AppActiveRecord::STATUS_PUBLISHREADY){
                    return Html::tag('li',Html::a('<span class="fa fa-plus-square-o fa-lg"></span> '.Yii::t('yii', 'Ready to be Publish'), $url, [
                        'title' => Yii::t('yii', 'Ready to be Publish'),
                        'data-pjax' => '0',
                        'data-method' => 'post',
                    ]));
                }else{
                    return '';
                }
            };
        }
        if (!isset($this->buttons['deallocate'])) {
            $this->buttons['deallocate'] = function ($url, $model) {
                return Html::tag('li',Html::a('<span class="fa fa-edit fa-lg"></span> '.Yii::t('yii', 'Deallocate'), $url, [
                    'title' => Yii::t('yii', 'Deallocate'),
                    'data-pjax' => '0',
                ]));
            };
        }
    }
protected function initDefaultButtons()
    {
        if (!isset($this->buttons['view'])) {
            $this->buttons['view'] = function ($url, $model) {
                return Html::tag('li',Html::a('<span class="fa fa-eye fa-lg"></span> '.Yii::t('yii', 'View'), $url, [
                    'title' => Yii::t('yii', 'View'),
                    'data-pjax' => '0',
                ]));
            };
        }
        if (!isset($this->buttons['update'])) {
            $this->buttons['update'] = function ($url, $model) {
                return Html::tag('li',Html::a('<span class="fa fa-edit fa-lg"></span> '.Yii::t('yii', 'Edit'), $url, [
                    'title' => Yii::t('yii', 'Edit'),
                    'data-pjax' => '0',
                ]));
            };
        }
        if (!isset($this->buttons['delete'])) {
            $this->buttons['delete'] = function ($url, $model) {
                return Html::tag('li',Html::a('<span class="fa fa-trash-o fa-lg"></span> '.Yii::t('yii', 'Delete'), $url, [
                    'title' => Yii::t('yii', 'Delete'),
                    'data-confirm' => Yii::t('yii', 'Are you sure you want to delete this item?'),
                    'data-method' => 'post',
                    'data-pjax' => '0',
                ]));
            };
        }
        
        if (!isset($this->buttons['restore'])) {
            $this->buttons['restore'] = function ($url, $model) {
                return Html::tag('li',Html::a('<span class="fa fa-undo fa-lg"></span> '.Yii::t('yii', 'Restore'), $url, [
                    'title' => Yii::t('yii', 'Restore'),
                    'data-pjax' => '0',
                ]));
            };
        }
        
        if (!isset($this->buttons['setpassword'])) {
            $this->buttons['setpassword'] = function ($url, $model) {
                return Html::tag('li',Html::a('<span class="fa fa-shield fa-lg"></span> '.Yii::t('yii', 'Set Password'), $url, [
                    'title' => Yii::t('yii', 'Set Password'),
                    'data-pjax' => '0',
                ]));
            };
        }
        
        if (!isset($this->buttons['changepass'])) {
            $this->buttons['changepass'] = function ($url, $model) {
                return Html::tag('li',Html::a('<span class="fa fa-shield fa-lg"></span> '.Yii::t('yii', 'Change Password'), $url, [
                    'title' => Yii::t('yii', 'Change Password'),
                    'data-pjax' => '0',
                ]));
            };
        }
        
        if (!isset($this->buttons['publish'])) {
            $this->buttons['publish'] = function ($url, $model) {
                if($model->state != AppActiveRecord::STATUS_PUBLISH){
                    return Html::tag('li',Html::a('<span class="fa fa-check-square-o fa-lg"></span> '.Yii::t('yii', 'Publish'), $url, [
                        'title' => Yii::t('yii', 'Publish'),
                        'data-pjax' => '0',
                        'data-method' => 'post',
                    ]));
                }else{
                    return '';
                }                
            };
        }
        
        if (!isset($this->buttons['unpublish'])) {
            $this->buttons['unpublish'] = function ($url, $model) {
                if($model->state != AppActiveRecord::STATUS_UNPUBLISH){
                    return Html::tag('li',Html::a('<span class="fa fa-minus-square-o fa-lg"></span> '.Yii::t('yii', 'Unpublish'), $url, [
                        'title' => Yii::t('yii', 'Unpublish'),
                        'data-pjax' => '0',
                        'data-method' => 'post',
                    ]));
                }else{
                    return '';
                }
            };
        }
        
        if (!isset($this->buttons['sendtopublish'])) {
            $this->buttons['sendtopublish'] = function ($url, $model) {
                if($model->state != AppActiveRecord::STATUS_PUBLISHREADY){
                    return Html::tag('li',Html::a('<span class="fa fa-plus-square-o fa-lg"></span> '.Yii::t('yii', 'Ready to be Publish'), $url, [
                        'title' => Yii::t('yii', 'Ready to be Publish'),
                        'data-pjax' => '0',
                        'data-method' => 'post',
                    ]));
                }else{
                    return '';
                }
            };
        }
        if (!isset($this->buttons['deallocate'])) {
            $this->buttons['deallocate'] = function ($url, $model) {
                return Html::tag('li',Html::a('<span class="fa fa-edit fa-lg"></span> '.Yii::t('yii', 'Deallocate'), $url, [
                    'title' => Yii::t('yii', 'Deallocate'),
                    'data-pjax' => '0',
                ]));
            };
        }
    }
Initializes the default button rendering callbacks