public function ContextDefinition::__construct in Zircon Profile 8
Same name in this branch
- 8 core/lib/Drupal/Core/Annotation/ContextDefinition.php \Drupal\Core\Annotation\ContextDefinition::__construct()
- 8 core/lib/Drupal/Core/Plugin/Context/ContextDefinition.php \Drupal\Core\Plugin\Context\ContextDefinition::__construct()
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Plugin/Context/ContextDefinition.php \Drupal\Core\Plugin\Context\ContextDefinition::__construct()
Constructs a new context definition object.
Parameters
string $data_type: The required data type.
mixed string|null $label: The label of this context definition for the UI.
bool $required: Whether the context definition is required.
bool $multiple: Whether the context definition is multivalue.
string|null $description: The description of this context definition for the UI.
mixed $default_value: The default value of this definition.
File
- core/
lib/ Drupal/ Core/ Plugin/ Context/ ContextDefinition.php, line 104 - Contains \Drupal\Core\Plugin\Context\ContextDefinition.
Class
- ContextDefinition
- Defines a class for context definitions.
Namespace
Drupal\Core\Plugin\ContextCode
public function __construct($data_type = 'any', $label = NULL, $required = TRUE, $multiple = FALSE, $description = NULL, $default_value = NULL) {
$this->dataType = $data_type;
$this->label = $label;
$this->isRequired = $required;
$this->isMultiple = $multiple;
$this->description = $description;
$this->defaultValue = $default_value;
}