Code Duplication    Length = 11-11 lines in 2 locations

modules/grid/ActionColumn.php 2 locations

@@ 15-25 (lines=11) @@
12
13
    protected function initDefaultButtons()
14
    {
15
        if (!isset($this->buttons['view'])) {
16
            $this->buttons['view'] = function ($url, $model, $key) {
17
                $options = array_merge([
18
                    'title' => Yii::t('yii', 'View'),
19
                    'aria-label' => Yii::t('yii', 'View'),
20
                    'data-pjax' => '0',
21
                    'class' => 'btn btn-primary',
22
                ], $this->buttonOptions);
23
                return Html::a('<span class="glyphicon glyphicon-eye-open"></span>', $url, $options);
24
            };
25
        }
26
        if (!isset($this->buttons['update'])) {
27
            $this->buttons['update'] = function ($url, $model, $key) {
28
                $options = array_merge([
@@ 26-36 (lines=11) @@
23
                return Html::a('<span class="glyphicon glyphicon-eye-open"></span>', $url, $options);
24
            };
25
        }
26
        if (!isset($this->buttons['update'])) {
27
            $this->buttons['update'] = function ($url, $model, $key) {
28
                $options = array_merge([
29
                    'title' => Yii::t('yii', 'Update'),
30
                    'aria-label' => Yii::t('yii', 'Update'),
31
                    'data-pjax' => '0',
32
                    'class' => 'btn btn-info',
33
                ], $this->buttonOptions);
34
                return Html::a('<span class="glyphicon glyphicon-pencil"></span>', $url, $options);
35
            };
36
        }
37
        if (!isset($this->buttons['delete'])) {
38
            $this->buttons['delete'] = function ($url, $model, $key) {
39
                $options = array_merge([