public function handleSort(array $sort)
	{
		if (count($sort) === 0) {
			$sort = $this->default_sort;
		}

		foreach ($sort as $key => $value) {
			try {
				$column = $this->getColumn($key);

			} catch (DataGridColumnNotFoundException $e) {
				unset($sort[$key]);
				continue;
			}

			if ($column->sortableResetPagination()) {
				$this->saveSessionData('_grid_page', $this->page = 1);
			}

			if ($column->getSortableCallback()) {
				$this->sort_callback = $column->getSortableCallback();
			}
		}

		$this->saveSessionData('_grid_has_sorted', 1);
		$this->saveSessionData('_grid_sort', $this->sort = $sort);

		$this->reloadTheWholeGrid();
	}
public function handleSort(array $sort)
	{
		if (count($sort) === 0) {
			$sort = $this->default_sort;
		}

		foreach ($sort as $key => $value) {
			try {
				$column = $this->getColumn($key);

			} catch (DataGridColumnNotFoundException $e) {
				unset($sort[$key]);
				continue;
			}

			if ($column->sortableResetPagination()) {
				$this->saveSessionData('_grid_page', $this->page = 1);
			}

			if ($column->getSortableCallback()) {
				$this->sort_callback = $column->getSortableCallback();
			}
		}

		$this->saveSessionData('_grid_has_sorted', 1);
		$this->saveSessionData('_grid_sort', $this->sort = $sort);

		$this->reloadTheWholeGrid();
	}
public function handleSort ( array $ sort ) { if ( count ( $ sort ) === 0 ) { $ sort = $ this -> default_sort ; } foreach ( $ sort as $ key => $ value ) { try { $ column = $ this -> getColumn ( $ key ) ; } catch ( DataGridColumnNotFoundException $ e ) { unset ( $ sort [ $ key ] ) ; continue ; } if ( $ column -> sortableResetPagination ( ) ) { $ this -> saveSessionData ( '_grid_page' , $ this -> page = 1 ) ; } if ( $ column -> getSortableCallback ( ) ) { $ this -> sort_callback = $ column -> getSortableCallback ( ) ; } } $ this -> saveSessionData ( '_grid_has_sorted' , 1 ) ; $ this -> saveSessionData ( '_grid_sort' , $ this -> sort = $ sort ) ; $ this -> reloadTheWholeGrid ( ) ; }
Handler for sorting
@param array $sort
@return void
@throws DataGridColumnNotFoundException
Handler for sorting