EntityDataProducerPluginBase.php in Open Social 10.0.x
Same filename and directory in other branches
- 10.3.x modules/custom/social_graphql/src/Plugin/GraphQL/DataProducer/Entity/EntityDataProducerPluginBase.php
- 10.1.x modules/custom/social_graphql/src/Plugin/GraphQL/DataProducer/Entity/EntityDataProducerPluginBase.php
- 10.2.x modules/custom/social_graphql/src/Plugin/GraphQL/DataProducer/Entity/EntityDataProducerPluginBase.php
File
modules/custom/social_graphql/src/Plugin/GraphQL/DataProducer/Entity/EntityDataProducerPluginBase.phpView source
<?php
declare (strict_types=1);
namespace Drupal\social_graphql\Plugin\GraphQL\DataProducer\Entity;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
use Drupal\graphql\Plugin\GraphQL\DataProducer\DataProducerPluginBase;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* Bass class for Open Social entity data producers dealing with connections.
*/
class EntityDataProducerPluginBase extends DataProducerPluginBase implements ContainerFactoryPluginInterface {
/**
* The entity type manager service.
*
* @var \Drupal\Core\Entity\EntityTypeManagerInterface
*/
protected $entityTypeManager;
/**
* {@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'));
}
/**
* 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.
*
* @codeCoverageIgnore
*/
public function __construct(array $configuration, $pluginId, array $pluginDefinition, EntityTypeManagerInterface $entityTypeManager) {
parent::__construct($configuration, $pluginId, $pluginDefinition);
$this->entityTypeManager = $entityTypeManager;
}
}
Classes
Name | Description |
---|---|
EntityDataProducerPluginBase | Bass class for Open Social entity data producers dealing with connections. |