You are here

public static function ThunderSchemaExtensionPluginBase::create in Thunder 6.2.x

File

modules/thunder_gqls/src/Plugin/GraphQL/SchemaExtension/ThunderSchemaExtensionPluginBase.php, line 39

Class

ThunderSchemaExtensionPluginBase
The base class for Thunder schema extension plugins.

Namespace

Drupal\thunder_gqls\Plugin\GraphQL\SchemaExtension

Code

public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
  $plugin = parent::create($container, $configuration, $plugin_id, $plugin_definition);
  $plugin
    ->createResolverBuilder();
  $plugin
    ->setDataProducerManager($container
    ->get('plugin.manager.graphql.data_producer'));
  $plugin
    ->setEntityTypeManager($container
    ->get('entity_type.manager'));
  return $plugin;
}