You are here

public function Context::getCondition in Context 8.0

Same name and namespace in other branches
  1. 8.4 src/Entity/Context.php \Drupal\context\Entity\Context::getCondition()
  2. 8 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

Overrides ContextInterface::getCondition

File

src/Entity/Context.php, line 263

Class

Context
Defines the Context entity.

Namespace

Drupal\context\Entity

Code

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