You are here

public function Context::removeCondition in Context 8.4

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

Overrides ContextInterface::removeCondition

File

src/Entity/Context.php, line 289

Class

Context
Defines the Context entity.

Namespace

Drupal\context\Entity

Code

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