public function CustomEntityField::clickSort in CiviCRM Entity 8.3
Called to determine what to tell the clicksorter.
Overrides EntityField::clickSort
File
- src/
Plugin/ views/ field/ CustomEntityField.php, line 125
Class
- CustomEntityField
- A field that displays entity field data for custom fields.
Namespace
Drupal\civicrm_entity\Plugin\views\fieldCode
public function clickSort($order) {
$this
->ensureMyTable();
if ($this->fieldMetadata && $this->fieldMetadata['column_name']) {
$this->query
->addOrderBy(NULL, NULL, $order, $this->tableAlias . '.' . $this->fieldMetadata['column_name']);
}
}