You are here

class ToolbarItemDependencyConstraint in Drupal 10

A CKEditor 5 toolbar item.

@Constraint( id = "CKEditor5ToolbarItemDependencyConstraint", label = @Translation("CKEditor 5 toolbar item dependency", context = "Validation"), )

@internal

Hierarchy

Expanded class hierarchy of ToolbarItemDependencyConstraint

File

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

Namespace

Drupal\ckeditor5\Plugin\Validation\Constraint
View source
class ToolbarItemDependencyConstraint extends Constraint {

  /**
   * The default violation message.
   *
   * @var string
   */
  public $message = 'Depends on %toolbar_item, which is not enabled.';

  /**
   * The toolbar item that this validation constraint requires to be enabled.
   *
   * @var null|string
   */
  public $toolbarItem = NULL;

  /**
   * {@inheritdoc}
   */
  public function getRequiredOptions() {
    return [
      'toolbarItem',
    ];
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ToolbarItemDependencyConstraint::$message public property The default violation message.
ToolbarItemDependencyConstraint::$toolbarItem public property The toolbar item that this validation constraint requires to be enabled.
ToolbarItemDependencyConstraint::getRequiredOptions public function