You are here

public function LdapVariableAttribute::query in Lightweight Directory Access Protocol (LDAP) 8.4

Same name in this branch
  1. 8.4 ldap_query/src/Plugin/views/filter/LdapVariableAttribute.php \Drupal\ldap_query\Plugin\views\filter\LdapVariableAttribute::query()
  2. 8.4 ldap_query/src/Plugin/views/argument/LdapVariableAttribute.php \Drupal\ldap_query\Plugin\views\argument\LdapVariableAttribute::query()
Same name and namespace in other branches
  1. 8.3 ldap_query/src/Plugin/views/filter/LdapVariableAttribute.php \Drupal\ldap_query\Plugin\views\filter\LdapVariableAttribute::query()

Add this filter to the query.

Due to the nature of fapi, the value and the operator have an unintended level of indirection. You will find them in $this->operator and $this->value respectively.

Overrides VariableAttributeCustomization::query

File

ldap_query/src/Plugin/views/filter/LdapVariableAttribute.php, line 23

Class

LdapVariableAttribute
Let's the user choose which LDAP attribute to use from the query.

Namespace

Drupal\ldap_query\Plugin\views\filter

Code

public function query($group_by = FALSE) : void {
  $this
    ->ensureMyTable();
  $this->realField = $this->options['attribute_name'];
  $field = "{$this->tableAlias}.{$this->realField}";
  $info = $this
    ->operators();
  if (!empty($info[$this->operator]['method'])) {
    $this
      ->{$info[$this->operator]['method']}($field);
  }
}