You are here

public function LdapAttribute::clickSort in Lightweight Directory Access Protocol (LDAP) 8.4

Adds an ORDER BY clause to the query for click sort columns.

Parameters

string $order: Either ASC or DESC

Overrides FieldPluginBase::clickSort

File

ldap_query/src/Plugin/views/field/LdapAttribute.php, line 122

Class

LdapAttribute
The handler for loading a specific LDAP field.

Namespace

Drupal\ldap_query\Plugin\views\field

Code

public function clickSort($order) : void {
  $params = $this->options['group_type'] !== 'group' ? [
    'function' => $this->options['group_type'],
  ] : [];
  $this->query
    ->addOrderBy(NULL, $this->realField, $order, $this->field_alias, $params);
}