protected function initDefaultButtons()
    {
        $this->buttons = ArrayHelper::merge(
            [
                'first' => [
                    'icon' => 'triangle-top',
                    'visible' => function ($model) {
                        /* @var $model \yii\db\BaseActiveRecord */
                        if ($this->attribute !== null && isset($model[$this->attribute])) {
                            return $model[$this->attribute] > 1;
                        }
                        return true;
                    },
                    'options' => [
                        'title' => 'Move top',
                        'aria-label' => 'Move top',
                        'data-method' => 'post'
                    ],
                ],
                'last' => [
                    'icon' => 'triangle-bottom',
                    'visible' => function ($model) {
                        /* @var $model \yii\db\BaseActiveRecord */
                        if ($this->attribute !== null && isset($model[$this->attribute])) {
                            return $model[$this->attribute] < $this->grid->dataProvider->getTotalCount();
                        }
                        return true;
                    },
                    'options' => [
                        'title' => 'Move bottom',
                        'aria-label' => 'Move bottom',
                        'data-method' => 'post'
                    ],
                ],
                'prev' => [
                    'icon' => 'arrow-up',
                    'visible' => function ($model) {
                        /* @var $model \yii\db\BaseActiveRecord */
                        if ($this->attribute !== null && isset($model[$this->attribute])) {
                            return $model[$this->attribute] > 1;
                        }
                        return true;
                    },
                    'options' => [
                        'title' => 'Move up',
                        'aria-label' => 'Move up',
                        'data-method' => 'post'
                    ],
                ],
                'next' => [
                    'icon' => 'arrow-down',
                    'visible' => function ($model) {
                        /* @var $model \yii\db\BaseActiveRecord */
                        if ($this->attribute !== null && isset($model[$this->attribute])) {
                            return $model[$this->attribute] < $this->grid->dataProvider->getTotalCount();
                        }
                        return true;
                    },
                    'options' => [
                        'title' => 'Move down',
                        'aria-label' => 'Move down',
                        'data-method' => 'post'
                    ],
                ],
            ],
            $this->buttons
        );
    }