Code Duplication    Length = 16-16 lines in 2 locations

src/widgets/ActionBox.php 1 location

@@ 135-150 (lines=16) @@
132
        return ob_get_clean();
133
    }
134
135
    public function renderPerPage()
136
    {
137
        return ButtonDropdown::widget([
138
            'label' => Yii::t('app', 'Per page') . ': ' . (Yii::$app->request->get('per_page') ?: 25),
139
            'options' => ['class' => 'btn-default'],
140
            'dropdown' => [
141
                'items' => [
142
                    ['label' => '25',  'url' => Url::current(['per_page' => null])],
143
                    ['label' => '50',  'url' => Url::current(['per_page' => 50])],
144
                    ['label' => '100', 'url' => Url::current(['per_page' => 100])],
145
                    ['label' => '200', 'url' => Url::current(['per_page' => 200])],
146
                    ['label' => '500', 'url' => Url::current(['per_page' => 500])],
147
                ],
148
            ],
149
        ]);
150
    }
151
152
    public function renderRepresentation()
153
    {

src/widgets/IndexPage.php 1 location

@@ 81-96 (lines=16) @@
78
        return AdvancedSearch::renderButton() . "\n";
79
    }
80
81
    public function renderPerPage()
82
    {
83
        return ButtonDropdown::widget([
84
            'label' => Yii::t('app', 'Per page') . ': ' . (Yii::$app->request->get('per_page') ?: 25),
85
            'options' => ['class' => 'btn-default'],
86
            'dropdown' => [
87
                'items' => [
88
                    ['label' => '25',  'url' => Url::current(['per_page' => null])],
89
                    ['label' => '50',  'url' => Url::current(['per_page' => 50])],
90
                    ['label' => '100', 'url' => Url::current(['per_page' => 100])],
91
                    ['label' => '200', 'url' => Url::current(['per_page' => 200])],
92
                    ['label' => '500', 'url' => Url::current(['per_page' => 500])],
93
                ],
94
            ],
95
        ]);
96
    }
97
98
    public function renderRepresentation()
99
    {