class StyleSensibleElementConstraint

Same name and namespace in other branches
  1. 11.x core/modules/ckeditor5/src/Plugin/Validation/Constraint/StyleSensibleElementConstraint.php \Drupal\ckeditor5\Plugin\Validation\Constraint\StyleSensibleElementConstraint
  2. 10 core/modules/ckeditor5/src/Plugin/Validation/Constraint/StyleSensibleElementConstraint.php \Drupal\ckeditor5\Plugin\Validation\Constraint\StyleSensibleElementConstraint
  3. 9 core/modules/ckeditor5/src/Plugin/Validation/Constraint/StyleSensibleElementConstraint.php \Drupal\ckeditor5\Plugin\Validation\Constraint\StyleSensibleElementConstraint

Styles can only be specified for HTML5 tags and extra classes.

@internal

Attributes

#[Constraint(id: 'StyleSensibleElement', label: new TranslatableMarkup('Styles can only be specified for already supported tags.', [], [ 'context' => 'Validation', ]))]

Hierarchy

Expanded class hierarchy of StyleSensibleElementConstraint

File

core/modules/ckeditor5/src/Plugin/Validation/Constraint/StyleSensibleElementConstraint.php, line 17

Namespace

Drupal\ckeditor5\Plugin\Validation\Constraint
View source
class StyleSensibleElementConstraint extends SymfonyConstraint {
  public function __construct(mixed $options = NULL, public $nonHtml5TagMessage = 'A style can only be specified for an HTML 5 tag. <code>@tag</code> is not an HTML5 tag.', public $conflictingEnabledPluginMessage = 'A style must only specify classes not supported by other plugins. The <code>@classes</code> classes on <code>@tag</code> are already supported by the enabled %plugin plugin.', public $conflictingDisabledPluginMessage = 'A style must only specify classes not supported by other plugins. The <code>@classes</code> classes on <code>@tag</code> are supported by the %plugin plugin. Remove this style and enable that plugin instead.', public $unsupportedTagMessage = 'The <code>@tag</code> tag is not yet supported by the Style plugin.', ?array $groups = NULL, mixed $payload = NULL) {
    parent::__construct($options, $groups, $payload);
  }

}

Members

Title Sort descending Modifiers Object type Summary
StyleSensibleElementConstraint::__construct public function #[HasNamedArguments]

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