/** * Load state (from $_GET) for the control * @param array */ public function loadState(array $params) { $foo = $this->params; parent::loadState($params); $this->params = $this->params + $foo; $this->linkOpts = array_intersect_key($this->params, array('limit' => 0, 'order' => 0, 'sorting' => 0, 'offset' => 0, 'filter' => 0)); }
/** * Load state (from $_GET) for the control * @param array */ public function loadState(array $params) { $default = $this->params; // dump($default); parent::loadState($params); $new_params = $this->params; foreach ($new_params as $k => $l) { if ($l == NULL) { unset($new_params[$k]); } } $this->params = $new_params + $default; // $this->params = (array) $default + $this->params; // $this->params = $this->params + (array)$default; // $this->params = array_merge($this->params, (array) $default); }
/** * Loads state informations. * @param array * @return void */ public function loadState(array $params) { parent::loadState($params); $this->getPaginator()->page = $this->page; }