You are here

public static function EntityRendered::create in GraphQL 8.4

@codeCoverageIgnore

Overrides ContainerFactoryPluginInterface::create

File

src/Plugin/GraphQL/DataProducer/Entity/EntityRendered.php, line 58

Class

EntityRendered
Returns the rendered entity in a given view mode.

Namespace

Drupal\graphql\Plugin\GraphQL\DataProducer\Entity

Code

public static function create(ContainerInterface $container, array $configuration, $pluginId, $pluginDefinition) {
  return new static($configuration, $pluginId, $pluginDefinition, $container
    ->get('entity_type.manager'), $container
    ->get('renderer'));
}