public function renderLengthPicker()
    {
        $pagination = $this->dataProvider->getPagination();
        if ($pagination === false || $this->dataProvider->getCount() <= 0) {
            return '';
        }
        $pagination->totalCount = $this->dataProvider->getTotalCount();
        $choices = [];
        foreach ([10, 25, 50] as $value) {
            $cssClass = $value === $pagination->pageSize ? 'active' : '';
            $url = $pagination->createUrl($pagination->getPage(), $value);
            $choices[] = '<li class="'.$cssClass.'"><a href="' . $url . '">' . $value . '</a></li>';
        }
        return Html::tag('ul', implode("\n", $choices), $this->lengthPickerOptions);
    }
public function renderLengthPicker()
    {
        $pagination = $this->dataProvider->getPagination();
        if ($pagination === false || $this->dataProvider->getCount() <= 0) {
            return '';
        }
        $pagination->totalCount = $this->dataProvider->getTotalCount();
        $choices = [];
        foreach ([10, 25, 50] as $value) {
            $cssClass = $value === $pagination->pageSize ? 'active' : '';
            $url = $pagination->createUrl($pagination->getPage(), $value);
            $choices[] = '<li class="'.$cssClass.'"><a href="' . $url . '">' . $value . '</a></li>';
        }
        return Html::tag('ul', implode("\n", $choices), $this->lengthPickerOptions);
    }
public function renderLengthPicker ( ) { $ pagination = $ this -> dataProvider -> getPagination ( ) ; if ( $ pagination === false || $ this -> dataProvider -> getCount ( ) <= 0 ) { return '' ; } $ pagination -> totalCount = $ this -> dataProvider -> getTotalCount ( ) ; $ choices = [ ] ; foreach ( [ 10 , 25 , 50 ] as $ value ) { $ cssClass = $ value === $ pagination -> pageSize ? 'active' : '' ; $ url = $ pagination -> createUrl ( $ pagination -> getPage ( ) , $ value ) ; $ choices [ ] = '<li class="' . $ cssClass . '"><a href="' . $ url . '">' . $ value . '</a></li>' ; } return Html :: tag ( 'ul' , implode ( "\n" , $ choices ) , $ this -> lengthPickerOptions ) ; }
Renders the page length picker.
@return string the rendering result
Renders the page length picker .