ConditionBase::condition

public ConditionBase::condition($field, $value = NULL, $operator = NULL, $langcode = NULL)

Adds a condition.

Parameters

string|\Drupal\Core\Entity\Query\ConditionInterface $field:

mixed $value:

string $operator:

string $langcode:

Return value

ConditionInterface

Overrides ConditionInterface::condition

See also

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

File

core/lib/Drupal/Core/Entity/Query/ConditionBase.php, line 13

Class

ConditionBase
Defines a common base class for all entity condition implementations.

Namespace

Drupal\Core\Entity\Query

Code

public function condition($field, $value = NULL, $operator = NULL, $langcode = NULL) {
  $this->conditions[] = array(
    'field' => $field,
    'value' => $value,
    'operator' => $operator,
    'langcode' => $langcode,
  );

  return $this;
}
doc_Drupal
2016-10-29 08:51:57
Comments
Leave a Comment

Please login to continue.