function ToolbarItemDependencyConstraint::__construct

Same name and namespace in other branches
  1. main core/modules/ckeditor5/src/Plugin/Validation/Constraint/ToolbarItemDependencyConstraint.php \Drupal\ckeditor5\Plugin\Validation\Constraint\ToolbarItemDependencyConstraint::__construct()

Attributes

#[HasNamedArguments]

File

core/modules/ckeditor5/src/Plugin/Validation/Constraint/ToolbarItemDependencyConstraint.php, line 30

Class

ToolbarItemDependencyConstraint
A CKEditor 5 toolbar item.

Namespace

Drupal\ckeditor5\Plugin\Validation\Constraint

Code

public function __construct(mixed $options = NULL, ?string $toolbarItem = NULL, public $message = 'Depends on %toolbar_item, which is not enabled.', ?array $groups = NULL, mixed $payload = NULL) {
  parent::__construct($options, $groups, $payload);
  $this->toolbarItem = $toolbarItem ?? $this->toolbarItem;
}

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