1 views_plugin_style_table.inc | 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
- core/
modules/ views/ plugins/ views_plugin_style_table.inc, line 47 - Contains the table style plugin.
Class
- views_plugin_style_table
- Style plugin to render each item as a row in a table.
Code
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']);
}