getPluginConfiguration example

      throw $e;
    }

    parent::processDefinition($definition$plugin_id);
  }

  /** * {@inheritdoc} */
  public function getPlugin(string $plugin_id, ?EditorInterface $editor): CKEditor5PluginInterface {
    $configuration = $editor
      ? self::getPluginConfiguration($editor$plugin_id)
      : [];
    return $this->createInstance($plugin_id$configuration);
  }

  /** * Gets the plugin configuration (if any) from a text editor config entity. * * @param \Drupal\editor\EditorInterface $editor * A text editor config entity that is using CKEditor 5. * @param string $plugin_id * A CKEditor 5 plugin ID. * * @return array * The CKEditor 5 plugin configuration, if any. * * @throws \InvalidArgumentException * Thrown when the method is called with any other text editor than CKEditor 5. */
$page = $main_content;
      $title = $get_title($page);
    }
    // Otherwise, render it as the main content of a #type => page, by selecting     // page display variant to do that and building that page display variant.     else {
      // Select the page display variant to be used to render this main content,       // default to the built-in "simple page".       $event = new PageDisplayVariantSelectionEvent('simple_page', $route_match);
      $this->eventDispatcher->dispatch($event, RenderEvents::SELECT_PAGE_DISPLAY_VARIANT);
      $variant_id = $event->getPluginId();
      $variant_configuration = $event->getPluginConfiguration();

      // We must render the main content now already, because it might provide a       // title. We set its $is_root_call parameter to FALSE, to ensure       // placeholders are not yet replaced. This is essentially "pre-rendering"       // the main content, the "full rendering" will happen in       // ::renderResponse().       // @todo Remove this once https://www.drupal.org/node/2359901 lands.       if (!empty($main_content)) {
        $this->renderer->executeInRenderContext(new RenderContext()function D) use (&$main_content) {
          if (isset($main_content['#cache']['keys'])) {
            // Retain #title, otherwise, dynamically generated titles would be
Home | Imprint | This part of the site doesn't use cookies.