You are here

class EntityDataProducerPluginBase in Open Social 10.1.x

Same name and namespace in other branches
  1. 10.0.x modules/custom/social_graphql/src/Plugin/GraphQL/DataProducer/Entity/EntityDataProducerPluginBase.php \Drupal\social_graphql\Plugin\GraphQL\DataProducer\Entity\EntityDataProducerPluginBase

Bass class for Open Social entity data producers dealing with connections.

Hierarchy

Expanded class hierarchy of EntityDataProducerPluginBase

1 file declares its use of EntityDataProducerPluginBase
QueryUser.php in modules/social_features/social_user/src/Plugin/GraphQL/DataProducer/QueryUser.php

File

modules/custom/social_graphql/src/Plugin/GraphQL/DataProducer/Entity/EntityDataProducerPluginBase.php, line 18

Namespace

Drupal\social_graphql\Plugin\GraphQL\DataProducer\Entity
View source
class EntityDataProducerPluginBase extends DataProducerPluginBase implements ContainerFactoryPluginInterface {

  /**
   * The entity type manager service.
   *
   * @var \Drupal\Core\Entity\EntityTypeManagerInterface
   */
  protected $entityTypeManager;

  /**
   * The GraphQL entity buffer.
   *
   * @var \Drupal\graphql\GraphQL\Buffers\EntityBuffer
   */
  protected $graphqlEntityBuffer;

  /**
   * The GraphQL entity UUID buffer.
   *
   * @var \Drupal\graphql\GraphQL\Buffers\EntityUuidBuffer
   */
  protected $graphqlEntityUuidBuffer;

  /**
   * The GraphQL entity revision buffer.
   *
   * @var \Drupal\graphql\GraphQL\Buffers\EntityRevisionBuffer
   */
  protected $graphqlEntityRevisionBuffer;

  /**
   * {@inheritdoc}
   *
   * @codeCoverageIgnore
   */
  public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
    return new static($configuration, $plugin_id, $plugin_definition, $container
      ->get('entity_type.manager'), $container
      ->get('graphql.buffer.entity'), $container
      ->get('graphql.buffer.entity_uuid'), $container
      ->get('graphql.buffer.entity_revision'));
  }

  /**
   * EntityLoad constructor.
   *
   * @param array $configuration
   *   The plugin configuration array.
   * @param string $pluginId
   *   The plugin id.
   * @param array $pluginDefinition
   *   The plugin definition array.
   * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager
   *   The entity type manager service.
   * @param \Drupal\graphql\GraphQL\Buffers\EntityBuffer $graphqlEntityBuffer
   *   The GraphQL entity buffer.
   * @param \Drupal\graphql\GraphQL\Buffers\EntityUuidBuffer $graphqlEntityUuidBuffer
   *   The GraphQL entity uuid buffer.
   * @param \Drupal\graphql\GraphQL\Buffers\EntityRevisionBuffer $graphqlEntityRevisionBuffer
   *   The GraphQL entity revision buffer.
   *
   * @codeCoverageIgnore
   */
  public function __construct(array $configuration, $pluginId, array $pluginDefinition, EntityTypeManagerInterface $entityTypeManager, EntityBuffer $graphqlEntityBuffer, EntityUuidBuffer $graphqlEntityUuidBuffer, EntityRevisionBuffer $graphqlEntityRevisionBuffer) {
    parent::__construct($configuration, $pluginId, $pluginDefinition);
    $this->entityTypeManager = $entityTypeManager;
    $this->graphqlEntityBuffer = $graphqlEntityBuffer;
    $this->graphqlEntityUuidBuffer = $graphqlEntityUuidBuffer;
    $this->graphqlEntityRevisionBuffer = $graphqlEntityRevisionBuffer;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
EntityDataProducerPluginBase::$entityTypeManager protected property The entity type manager service.
EntityDataProducerPluginBase::$graphqlEntityBuffer protected property The GraphQL entity buffer.
EntityDataProducerPluginBase::$graphqlEntityRevisionBuffer protected property The GraphQL entity revision buffer.
EntityDataProducerPluginBase::$graphqlEntityUuidBuffer protected property The GraphQL entity UUID buffer.
EntityDataProducerPluginBase::create public static function @codeCoverageIgnore Overrides ContainerFactoryPluginInterface::create
EntityDataProducerPluginBase::__construct public function EntityLoad constructor.