function EnabledConfigurablePluginsConstraintValidator::getConfigurableEnabledDefinitions

Same name in other branches
  1. 10 core/modules/ckeditor5/src/Plugin/Validation/Constraint/EnabledConfigurablePluginsConstraintValidator.php \Drupal\ckeditor5\Plugin\Validation\Constraint\EnabledConfigurablePluginsConstraintValidator::getConfigurableEnabledDefinitions()
  2. 11.x core/modules/ckeditor5/src/Plugin/Validation/Constraint/EnabledConfigurablePluginsConstraintValidator.php \Drupal\ckeditor5\Plugin\Validation\Constraint\EnabledConfigurablePluginsConstraintValidator::getConfigurableEnabledDefinitions()

Gets all configurable CKEditor 5 plugin definitions that are enabled.

Return value

\Drupal\ckeditor5\Plugin\CKEditor5PluginDefinition[] An array of enabled configurable CKEditor 5 plugin definitions.

1 call to EnabledConfigurablePluginsConstraintValidator::getConfigurableEnabledDefinitions()
EnabledConfigurablePluginsConstraintValidator::validate in core/modules/ckeditor5/src/Plugin/Validation/Constraint/EnabledConfigurablePluginsConstraintValidator.php

File

core/modules/ckeditor5/src/Plugin/Validation/Constraint/EnabledConfigurablePluginsConstraintValidator.php, line 71

Class

EnabledConfigurablePluginsConstraintValidator
Enabled configurable plugin settings validator.

Namespace

Drupal\ckeditor5\Plugin\Validation\Constraint

Code

private function getConfigurableEnabledDefinitions() : array {
    $text_editor = $this->createTextEditorObjectFromContext();
    $enabled_definitions = $this->pluginManager
        ->getEnabledDefinitions($text_editor);
    $configurable_enabled_definitions = array_filter($enabled_definitions, function (CKEditor5PluginDefinition $definition) : bool {
        return $definition->isConfigurable();
    });
    return $configurable_enabled_definitions;
}

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