class ToolbarItemConditionsMetConstraintValidator extends ConstraintValidator implements ContainerInjectionInterface (View source)

internal  
 

Toolbar item conditions met constraint validator.

Traits

Common functionality for many CKEditor 5 validation constraints.

Some CKEditor 5 constraint validators need a Text Editor object.

Properties

protected CKEditor5PluginManagerInterface $pluginManager

The CKEditor 5 plugin manager.

from  PluginManagerDependentValidatorTrait

Methods

__construct(CKEditor5PluginManagerInterface $plugin_manager)

Constructs a CKEditor5ConstraintValidatorTrait object.

static 
create(ContainerInterface $container)

{@inheritdoc}

validate($toolbar_item, Constraint $constraint)

{@inheritdoc}

findDefinitionForToolbarItem(string $toolbar_item)

Searches for CKEditor 5 plugin that provides a given toolbar item.

Details

__construct(CKEditor5PluginManagerInterface $plugin_manager)

Constructs a CKEditor5ConstraintValidatorTrait object.

Parameters

CKEditor5PluginManagerInterface $plugin_manager

The CKEditor 5 plugin manager.

static create(ContainerInterface $container)

{@inheritdoc}

Parameters

ContainerInterface $container

validate($toolbar_item, Constraint $constraint)

{@inheritdoc}

Parameters

$toolbar_item
Constraint $constraint

Exceptions

UnexpectedTypeException

protected CKEditor5PluginDefinition findDefinitionForToolbarItem(string $toolbar_item)

Searches for CKEditor 5 plugin that provides a given toolbar item.

Parameters

string $toolbar_item

The toolbar item to be searched for within plugin definitions.

Return Value

CKEditor5PluginDefinition

The corresponding plugin definition.

Exceptions

OutOfBoundsException