getTypedConfig example

throw new InvalidPluginDefinitionException($idsprintf('The CKEditor 5 "%s" provides a plugin class: "%s", but it does not exist.', $id$definition['drupal']['class']));
    }
    elseif (isset($definition['drupal']['class']) && !in_array(CKEditor5PluginInterface::classclass_implements($definition['drupal']['class']))) {
      throw new InvalidPluginDefinitionException($idsprintf('CKEditor 5 plugins must implement \Drupal\ckeditor5\Plugin\CKEditor5PluginInterface. "%s" does not.', $id));
    }
    elseif (in_array(CKEditor5PluginConfigurableInterface::classclass_implements($definition['drupal']['class'], TRUE))) {
      $default_configuration = (new \ReflectionClass($definition['drupal']['class']))
        ->newInstanceWithoutConstructor()
        ->defaultConfiguration();
      if (!empty($default_configuration)) {
        $configuration_name = sprintf("ckeditor5.plugin.%s", $definition['id']);
        if (!$this->getTypedConfig()->hasConfigSchema($configuration_name)) {
          throw new InvalidPluginDefinitionException($idsprintf('The "%s" CKEditor 5 plugin definition is configurable, has non-empty default configuration but has no config schema. Config schema is required for validation.', $id));
        }
        $error_message = $this->validateConfiguration($default_configuration);
        if ($error_message) {
          throw new InvalidPluginDefinitionException($idsprintf('The "%s" CKEditor 5 plugin definition is configurable, but its default configuration does not match its config schema. %s', $id$error_message));
        }
      }
    }

    if ($definition['drupal']['conditions'] !== FALSE) {
      // @see \Drupal\ckeditor5\Plugin\CKEditor5PluginManager::isPluginDisabled()
Home | Imprint | This part of the site doesn't use cookies.