You are here

private function PluginManagerDependentValidatorTrait::getOtherEnabledPlugins in Drupal 10

Gets all other enabled CKEditor 5 plugin definitions.

Parameters

\Drupal\editor\EditorInterface $text_editor: A Text Editor config entity configured to use CKEditor 5.

string $except: A CKEditor 5 plugin ID to exclude: all enabled plugins other than this one are returned.

Return value

\Drupal\ckeditor5\Plugin\CKEditor5PluginDefinition[] A list of CKEditor 5 plugin definitions keyed by plugin ID.

2 calls to PluginManagerDependentValidatorTrait::getOtherEnabledPlugins()
SourceEditingRedundantTagsConstraintValidator::validate in core/modules/ckeditor5/src/Plugin/Validation/Constraint/SourceEditingRedundantTagsConstraintValidator.php
StyleSensibleElementConstraintValidator::validate in core/modules/ckeditor5/src/Plugin/Validation/Constraint/StyleSensibleElementConstraintValidator.php

File

core/modules/ckeditor5/src/Plugin/Validation/Constraint/PluginManagerDependentValidatorTrait.php, line 59

Class

PluginManagerDependentValidatorTrait
Common functionality for many CKEditor 5 validation constraints.

Namespace

Drupal\ckeditor5\Plugin\Validation\Constraint

Code

private function getOtherEnabledPlugins(EditorInterface $text_editor, string $except) : array {
  $enabled_plugins = $this->pluginManager
    ->getEnabledDefinitions($text_editor);
  unset($enabled_plugins[$except]);
  return $enabled_plugins;
}