shouldEnforceSchemas example

  }

  /** * Creates an instance. * * @throws \Drupal\sdc\Exception\ComponentNotFoundException * * @internal */
  public function createInstance($plugin_id, array $configuration = []): Component {
    $configuration['app_root'] = $this->appRoot;
    $configuration['enforce_schemas'] = $this->shouldEnforceSchemas(
      $this->definitions[$plugin_id] ?? []
    );
    try {
      $instance = parent::createInstance($plugin_id$configuration);
      if (!$instance instanceof Component) {
        throw new ComponentNotFoundException(sprintf(
          'Unable to find component "%s" in the component repository.',
          $plugin_id,
        ));
      }
      return $instance;
    }
Home | Imprint | This part of the site doesn't use cookies.