function ToolbarItemDependencyConstraint::__construct

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

Constructs a ToolbarItemDependencyConstraint.

Parameters

string $toolbarItem: The toolbar item that this validation constraint requires to be enabled.

string $message: The error message.

array|null $groups: The groups that the constraint belongs to.

mixed|null $payload: Domain-specific data attached to a constraint.

File

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

Class

ToolbarItemDependencyConstraint
A CKEditor 5 toolbar item.

Namespace

Drupal\ckeditor5\Plugin\Validation\Constraint

Code

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

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