You are here

public function Condition::exists in CiviCRM Entity 8.3

Queries for the existence of a field.

Parameters

string $field:

string $langcode:

Return value

$this

Overrides ConditionInterface::exists

See also

\Drupal\Core\Entity\Query\QueryInterface::exists()

File

src/Entity/Query/CiviCRM/Condition.php, line 43

Class

Condition
Implements entity query conditions for CiviCRM.

Namespace

Drupal\civicrm_entity\Entity\Query\CiviCRM

Code

public function exists($field, $langcode = NULL) {
  return $this
    ->condition($field, NULL, 'IS NOT NULL', $langcode);
}