public function ConditionPluginCollection::addContext in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Condition/ConditionPluginCollection.php \Drupal\Core\Condition\ConditionPluginCollection::addContext()
Sets the condition context for a given name.
Parameters
string $name: The name of the context.
\Drupal\Component\Plugin\Context\ContextInterface $context: The context to add.
Return value
$this
File
- core/
lib/ Drupal/ Core/ Condition/ ConditionPluginCollection.php, line 67 - Contains \Drupal\Core\Condition\ConditionPluginCollection.
Class
- ConditionPluginCollection
- Provides a collection of condition plugins.
Namespace
Drupal\Core\ConditionCode
public function addContext($name, ContextInterface $context) {
$this->conditionContexts[$name] = $context;
return $this;
}