function views_plugin_style_table::build_sort
Determine if we should provide sorting based upon $_GET inputs.
Return value
bool
Overrides views_plugin_style::build_sort
File
-
plugins/
views_plugin_style_table.inc, line 54
Class
- views_plugin_style_table
- Style plugin to render each item as a row in a table.
Code
public function build_sort() {
if (!isset($_GET['order']) && ($this->options['default'] == -1 || empty($this->view->field[$this->options['default']]))) {
return TRUE;
}
// If a sort we don't know anything about gets through, exit gracefully.
if (isset($_GET['order']) && empty($this->view->field[$_GET['order']])) {
return TRUE;
}
// Let the builder know whether or not we're overriding the default sorts.
return empty($this->options['override']);
}