You are here

public function Context::removeCondition in Context 8.0

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

Remove the specified condition.

Parameters

string $condition_id: The id of the condition to remove.

Return value

$this

Overrides ContextInterface::removeCondition

File

src/Entity/Context.php, line 284

Class

Context
Defines the Context entity.

Namespace

Drupal\context\Entity

Code

public function removeCondition($condition_id) {
  $this
    ->getConditions()
    ->removeInstanceId($condition_id);
  return $this;
}