function ContextAwarePluginDefinitionTrait::removeContextDefinition

Same name in other branches
  1. 8.9.x core/lib/Drupal/Component/Plugin/Definition/ContextAwarePluginDefinitionTrait.php \Drupal\Component\Plugin\Definition\ContextAwarePluginDefinitionTrait::removeContextDefinition()
  2. 10 core/lib/Drupal/Component/Plugin/Definition/ContextAwarePluginDefinitionTrait.php \Drupal\Component\Plugin\Definition\ContextAwarePluginDefinitionTrait::removeContextDefinition()
  3. 11.x core/lib/Drupal/Component/Plugin/Definition/ContextAwarePluginDefinitionTrait.php \Drupal\Component\Plugin\Definition\ContextAwarePluginDefinitionTrait::removeContextDefinition()

Implements \Drupal\Component\Plugin\Definition\ContextAwarePluginDefinitionInterface::removeContextDefinition().

File

core/lib/Drupal/Component/Plugin/Definition/ContextAwarePluginDefinitionTrait.php, line 55

Class

ContextAwarePluginDefinitionTrait
Provides a trait for context-aware object-based plugin definitions.

Namespace

Drupal\Component\Plugin\Definition

Code

public function removeContextDefinition($name) {
    unset($this->contextDefinitions[$name]);
    return $this;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.