function Condition::__construct

Same name in this branch
  1. 11.x core/lib/Drupal/Core/Database/Query/Condition.php \Drupal\Core\Database\Query\Condition::__construct()
Same name in other branches
  1. 9 core/lib/Drupal/Core/Database/Query/Condition.php \Drupal\Core\Database\Query\Condition::__construct()
  2. 8.9.x core/lib/Drupal/Core/Database/Query/Condition.php \Drupal\Core\Database\Query\Condition::__construct()
  3. 10 core/lib/Drupal/Core/Database/Query/Condition.php \Drupal\Core\Database\Query\Condition::__construct()
  4. 10 core/lib/Drupal/Core/Condition/Attribute/Condition.php \Drupal\Core\Condition\Attribute\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\Attribute

Code

public function __construct(string $id, ?TranslatableMarkup $label = NULL, ?string $module = NULL, ?TranslatableMarkup $category = NULL, array $context_definitions = [], ?string $deriver = NULL) {
}

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