You are here

public function Context::getCondition in Context 8.4

Same name and namespace in other branches
  1. 8 src/Entity/Context.php \Drupal\context\Entity\Context::getCondition()
  2. 8.0 src/Entity/Context.php \Drupal\context\Entity\Context::getCondition()

Get a condition with the specified ID.

Parameters

string $condition_id: The condition to get.

Return value

\Drupal\Core\Condition\ConditionInterface The specific Condition.

Overrides ContextInterface::getCondition

File

src/Entity/Context.php, line 268

Class

Context
Defines the Context entity.

Namespace

Drupal\context\Entity

Code

public function getCondition($condition_id) {
  return $this
    ->getConditions()
    ->get($condition_id);
}