class AllDocsFactory in Replication 8
Same name and namespace in other branches
- 8.2 src/AllDocsFactory.php \Drupal\replication\AllDocsFactory
Hierarchy
- class \Drupal\replication\AllDocsFactory implements BulkDocsFactoryInterface
Expanded class hierarchy of AllDocsFactory
1 string reference to 'AllDocsFactory'
1 service uses AllDocsFactory
File
- src/AllDocsFactory.php, line 12 
Namespace
Drupal\replicationView source
class AllDocsFactory implements BulkDocsFactoryInterface {
  /**
   * @var \Drupal\Core\Entity\EntityTypeManagerInterface
   */
  protected $entityTypeManager;
  /**
   * @var \Drupal\replication\BulkDocs\BulkDocs[]
   */
  protected $instances = [];
  /**
   * Constructor.
   *
   * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
   * @param \Drupal\multiversion\MultiversionManagerInterface $multiversion_manager
   * @param \Drupal\multiversion\Entity\Index\EntityIndexInterface $entity_index
   * @param \Symfony\Component\Serializer\SerializerInterface $serializer
   */
  public function __construct(EntityTypeManagerInterface $entity_type_manager, MultiversionManagerInterface $multiversion_manager, EntityIndexInterface $entity_index, SerializerInterface $serializer) {
    $this->entityTypeManager = $entity_type_manager;
    $this->multiversionManager = $multiversion_manager;
    $this->entityIndex = $entity_index;
    $this->serializer = $serializer;
  }
  /**
   * @inheritDoc
   */
  public function get(WorkspaceInterface $workspace) {
    if (!isset($this->instances[$workspace
      ->id()])) {
      $this->instances[$workspace
        ->id()] = new AllDocs($this->entityTypeManager, $this->multiversionManager, $workspace, $this->entityIndex, $this->serializer);
    }
    return $this->instances[$workspace
      ->id()];
  }
}Members
| Name   | Modifiers | Type | Description | Overrides | 
|---|---|---|---|---|
| AllDocsFactory:: | protected | property | ||
| AllDocsFactory:: | protected | property | ||
| AllDocsFactory:: | public | function | @inheritDoc Overrides BulkDocsFactoryInterface:: | |
| AllDocsFactory:: | public | function | Constructor. | 
