You are here

public function ContextDefinition::setDefaultValue in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Plugin/Context/ContextDefinition.php \Drupal\Core\Plugin\Context\ContextDefinition::setDefaultValue()
  2. 9 core/lib/Drupal/Core/Plugin/Context/ContextDefinition.php \Drupal\Core\Plugin\Context\ContextDefinition::setDefaultValue()

Sets the default data value.

Parameters

mixed $default_value: The default value to be set or NULL to remove any default value.

Return value

$this

Overrides ContextDefinitionInterface::setDefaultValue

File

core/lib/Drupal/Core/Plugin/Context/ContextDefinition.php, line 203

Class

ContextDefinition
Defines a class for context definitions.

Namespace

Drupal\Core\Plugin\Context

Code

public function setDefaultValue($default_value) {
  $this->defaultValue = $default_value;
  return $this;
}