public function findSessionValues()
	{
		if (!ArraysHelper::testEmpty($this->filter) || ($this->page != 1) || !empty($this->sort)) {
			return;
		}

		if (!$this->remember_state) {
			return;
		}

		if ($page = $this->getSessionData('_grid_page')) {
			$this->page = $page;
		}

		if ($per_page = $this->getSessionData('_grid_per_page')) {
			$this->per_page = $per_page;
		}

		if ($sort = $this->getSessionData('_grid_sort')) {
			$this->sort = $sort;
		}

		foreach ($this->getSessionData() as $key => $value) {
			$other_session_keys = [
				'_grid_per_page',
				'_grid_sort',
				'_grid_page',
				'_grid_has_sorted',
				'_grid_has_filtered',
				'_grid_hidden_columns',
				'_grid_hidden_columns_manipulated',
			];

			if (!in_array($key, $other_session_keys, true)) {
				try {
					$this->getFilter($key);

					$this->filter[$key] = $value;

				} catch (DataGridException $e) {
					if ($this->strict_session_filter_values) {
						throw new DataGridFilterNotFoundException("Session filter: Filter [$key] not found");
					}
				}
			}
		}

		/**
		 * When column is sorted via custom callback, apply it
		 */
		if (empty($this->sort_callback) && !empty($this->sort)) {
			foreach ($this->sort as $key => $order) {
				try {
					$column = $this->getColumn($key);

				} catch (DataGridColumnNotFoundException $e) {
					$this->deleteSessionData('_grid_sort');
					$this->sort = [];

					return;
				}

				if ($column && $column->isSortable() && is_callable($column->getSortableCallback())) {
					$this->sort_callback = $column->getSortableCallback();
				}
			}
		}
	}
public function findSessionValues()
	{
		if (!ArraysHelper::testEmpty($this->filter) || ($this->page != 1) || !empty($this->sort)) {
			return;
		}

		if (!$this->remember_state) {
			return;
		}

		if ($page = $this->getSessionData('_grid_page')) {
			$this->page = $page;
		}

		if ($per_page = $this->getSessionData('_grid_per_page')) {
			$this->per_page = $per_page;
		}

		if ($sort = $this->getSessionData('_grid_sort')) {
			$this->sort = $sort;
		}

		foreach ($this->getSessionData() as $key => $value) {
			$other_session_keys = [
				'_grid_per_page',
				'_grid_sort',
				'_grid_page',
				'_grid_has_sorted',
				'_grid_has_filtered',
				'_grid_hidden_columns',
				'_grid_hidden_columns_manipulated',
			];

			if (!in_array($key, $other_session_keys, true)) {
				try {
					$this->getFilter($key);

					$this->filter[$key] = $value;

				} catch (DataGridException $e) {
					if ($this->strict_session_filter_values) {
						throw new DataGridFilterNotFoundException("Session filter: Filter [$key] not found");
					}
				}
			}
		}

		/**
		 * When column is sorted via custom callback, apply it
		 */
		if (empty($this->sort_callback) && !empty($this->sort)) {
			foreach ($this->sort as $key => $order) {
				try {
					$column = $this->getColumn($key);

				} catch (DataGridColumnNotFoundException $e) {
					$this->deleteSessionData('_grid_sort');
					$this->sort = [];

					return;
				}

				if ($column && $column->isSortable() && is_callable($column->getSortableCallback())) {
					$this->sort_callback = $column->getSortableCallback();
				}
			}
		}
	}
public function findSessionValues ( ) { if ( ! ArraysHelper :: testEmpty ( $ this -> filter ) || ( $ this -> page != 1 ) || ! empty ( $ this -> sort ) ) { return ; } if ( ! $ this -> remember_state ) { return ; } if ( $ page = $ this -> getSessionData ( '_grid_page' ) ) { $ this -> page = $ page ; } if ( $ per_page = $ this -> getSessionData ( '_grid_per_page' ) ) { $ this -> per_page = $ per_page ; } if ( $ sort = $ this -> getSessionData ( '_grid_sort' ) ) { $ this -> sort = $ sort ; } foreach ( $ this -> getSessionData ( ) as $ key => $ value ) { $ other_session_keys = [ '_grid_per_page' , '_grid_sort' , '_grid_page' , '_grid_has_sorted' , '_grid_has_filtered' , '_grid_hidden_columns' , '_grid_hidden_columns_manipulated' , ] ; if ( ! in_array ( $ key , $ other_session_keys , true ) ) { try { $ this -> getFilter ( $ key ) ; $ this -> filter [ $ key ] = $ value ; } catch ( DataGridException $ e ) { if ( $ this -> strict_session_filter_values ) { throw new DataGridFilterNotFoundException ( "Session filter: Filter [$key] not found" ) ; } } } } /**
		 * When column is sorted via custom callback, apply it
		 */ if ( empty ( $ this -> sort_callback ) && ! empty ( $ this -> sort ) ) { foreach ( $ this -> sort as $ key => $ order ) { try { $ column = $ this -> getColumn ( $ key ) ; } catch ( DataGridColumnNotFoundException $ e ) { $ this -> deleteSessionData ( '_grid_sort' ) ; $ this -> sort = [ ] ; return ; } if ( $ column && $ column -> isSortable ( ) && is_callable ( $ column -> getSortableCallback ( ) ) ) { $ this -> sort_callback = $ column -> getSortableCallback ( ) ; } } } }
Try to restore session stuff
@return void
@throws DataGridFilterNotFoundException
Try to restore session stuff