ToolbarItemConstraint.php

Same filename and directory in other branches
  1. 11.x core/modules/ckeditor5/src/Plugin/Validation/Constraint/ToolbarItemConstraint.php
  2. 10 core/modules/ckeditor5/src/Plugin/Validation/Constraint/ToolbarItemConstraint.php
  3. 9 core/modules/ckeditor5/src/Plugin/Validation/Constraint/ToolbarItemConstraint.php

Namespace

Drupal\ckeditor5\Plugin\Validation\Constraint

File

core/modules/ckeditor5/src/Plugin/Validation/Constraint/ToolbarItemConstraint.php

View source
<?php

declare (strict_types=1);
namespace Drupal\ckeditor5\Plugin\Validation\Constraint;

use Drupal\Core\StringTranslation\TranslatableMarkup;
use Drupal\Core\Validation\Attribute\Constraint;
use Symfony\Component\Validator\Attribute\HasNamedArguments;
use Symfony\Component\Validator\Constraint as SymfonyConstraint;

/**
 * A CKEditor 5 toolbar item.
 *
 * @see https://ckeditor.com/docs/ckeditor5/latest/features/toolbar/toolbar.html
 */
class ToolbarItemConstraint extends SymfonyConstraint {
  public function __construct(mixed $options = NULL, public $message = 'The provided toolbar item %toolbar_item is not valid.', ?array $groups = NULL, mixed $payload = NULL) {
    parent::__construct($options, $groups, $payload);
  }

}

Classes

Title Deprecated Summary
ToolbarItemConstraint A CKEditor 5 toolbar item.

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