public function run()
    {
        $size = 20;
        $saved = Yii::$app->session->get('per-page');
        if (in_array($saved, $this->pageSizes)) {
            $size = $saved;
        }
        $selected = Yii::$app->request->get('per-page');
        if (in_array($selected, $this->pageSizes)) {
            $size = $selected;
        }

        Yii::$app->session->set('per-page', $size);

        return Html::tag('div', Html::tag('div',
            Html::label(Yii::t('podium/view', 'Results per page'), 'per-page')
            . ' '
            . Html::dropDownList('per-page', $size, $this->pageSizes, ['class' => 'form-control input-sm', 'id' => 'per-page']),
            ['class' => 'form-group']
        ), ['class' => 'pull-right form-inline']) . '<br><br>';
    }
public function run()
    {
        $size = 20;
        $saved = Yii::$app->session->get('per-page');
        if (in_array($saved, $this->pageSizes)) {
            $size = $saved;
        }
        $selected = Yii::$app->request->get('per-page');
        if (in_array($selected, $this->pageSizes)) {
            $size = $selected;
        }

        Yii::$app->session->set('per-page', $size);

        return Html::tag('div', Html::tag('div',
            Html::label(Yii::t('podium/view', 'Results per page'), 'per-page')
            . ' '
            . Html::dropDownList('per-page', $size, $this->pageSizes, ['class' => 'form-control input-sm', 'id' => 'per-page']),
            ['class' => 'form-group']
        ), ['class' => 'pull-right form-inline']) . '<br><br>';
    }
public function run ( ) { $ size = 20 ; $ saved = Yii :: $ app -> session -> get ( 'per-page' ) ; if ( in_array ( $ saved , $ this -> pageSizes ) ) { $ size = $ saved ; } $ selected = Yii :: $ app -> request -> get ( 'per-page' ) ; if ( in_array ( $ selected , $ this -> pageSizes ) ) { $ size = $ selected ; } Yii :: $ app -> session -> set ( 'per-page' , $ size ) ; return Html :: tag ( 'div' , Html :: tag ( 'div' , Html :: label ( Yii :: t ( 'podium/view' , 'Results per page' ) , 'per-page' ) . ' ' . Html :: dropDownList ( 'per-page' , $ size , $ this -> pageSizes , [ 'class' => 'form-control input-sm' , 'id' => 'per-page' ] ) , [ 'class' => 'form-group' ] ) , [ 'class' => 'pull-right form-inline' ] ) . '<br><br>' ; }
Rendering the widget dropdown.
Default page size is 20.
@return string
Rendering the widget dropdown . Default page size is 20 .