/** * Restores the pager state. * This method overrides the parent implementation and is invoked when * the control is loading persistent state. */ public function loadState() { parent::loadState(); if ($this->getEnableViewState(true)) { $this->getControls()->clear(); $this->buildPager(); } }