function Condition::__construct
Constructs a Condition attribute.
Parameters
string $id: The plugin ID.
\Drupal\Core\StringTranslation\TranslatableMarkup|null $label: (optional) The human-readable name of the condition.
string|null $module: (optional) The name of the module providing the type.
\Drupal\Core\StringTranslation\TranslatableMarkup|null $category: (optional) The category under which the condition should be listed in the UI.
array $context_definitions: (optional) An array of context definitions describing the context used by the plugin.
class-string|null $deriver: (optional) The deriver class.
Overrides Plugin::__construct
File
-
core/
lib/ Drupal/ Core/ Condition/ Attribute/ Condition.php, line 48
Class
- Condition
- Defines a condition plugin attribute.
Namespace
Drupal\Core\Condition\AttributeCode
public function __construct(public readonly string $id, public readonly ?TranslatableMarkup $label = NULL, public readonly ?string $module = NULL, public readonly ?TranslatableMarkup $category = NULL, public readonly array $context_definitions = [], public readonly ?string $deriver = NULL) {
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.