public function Field::clickSortable in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/views/src/Plugin/views/field/Field.php \Drupal\views\Plugin\views\field\Field::clickSortable()
Determines if this field is click sortable.
Return value
bool The value of 'click sortable' from the plugin definition, this defaults to TRUE if not set.
Overrides FieldPluginBase::clickSortable
File
- core/
modules/ views/ src/ Plugin/ views/ field/ Field.php, line 280 - Contains \Drupal\views\Plugin\views\field\Field.
Class
- Field
- A field that displays entity field data.
Namespace
Drupal\views\Plugin\views\fieldCode
public function clickSortable() {
// A field is not click sortable if it's a multiple field with
// "group multiple values" checked, since a click sort in that case would
// add a join to the field table, which would produce unwanted duplicates.
if ($this->multiple && $this->options['group_rows']) {
return FALSE;
}
// If field definition is set, use that.
if (isset($this->definition['click sortable'])) {
return (bool) $this->definition['click sortable'];
}
// Default to true.
return TRUE;
}