class BulkDocsFactory in Replication 8.2
Same name and namespace in other branches
- 8 src/BulkDocsFactory.php \Drupal\replication\BulkDocsFactory
Hierarchy
- class \Drupal\replication\BulkDocsFactory implements BulkDocsFactoryInterface
Expanded class hierarchy of BulkDocsFactory
1 string reference to 'BulkDocsFactory'
1 service uses BulkDocsFactory
File
- src/
BulkDocsFactory.php, line 15
Namespace
Drupal\replicationView source
class BulkDocsFactory implements BulkDocsFactoryInterface {
/**
* @var \Drupal\multiversion\Workspace\WorkspaceManagerInterface
*/
protected $workspaceManager;
/**
* @var \Drupal\multiversion\Entity\Index\UuidIndexInterface
*/
protected $uuidIndex;
/**
* @var \Drupal\multiversion\Entity\Index\RevisionIndexInterface
*/
protected $revIndex;
/**
* @var \Drupal\Core\Entity\EntityTypeManagerInterface
*/
protected $entityTypeManager;
/**
* @var \Drupal\Core\Lock\LockBackendInterface
*/
protected $lock;
/**
* @var \Drupal\Core\Logger\LoggerChannelInterface
*/
protected $logger;
/**
* @var \Drupal\replication\BulkDocs\BulkDocs[]
*/
protected $instances = [];
/**
* The state service.
*
* @var \Drupal\Core\State\StateInterface
*/
protected $state;
/**
* Constructor.
*
* @param \Drupal\multiversion\Workspace\WorkspaceManagerInterface $workspace_manager
* @param \Drupal\multiversion\Entity\Index\UuidIndexInterface $uuid_index
* @param \Drupal\multiversion\Entity\Index\RevisionIndexInterface $rev_index
* @param \Drupal\Core\Lock\LockBackendInterface $lock
* @param \Drupal\Core\Logger\LoggerChannelFactoryInterface $logger_factory
* @param \Drupal\Core\State\StateInterface $state
*/
public function __construct(WorkspaceManagerInterface $workspace_manager, UuidIndexInterface $uuid_index, RevisionIndexInterface $rev_index, EntityTypeManagerInterface $entity_type_manager, LockBackendInterface $lock, LoggerChannelFactoryInterface $logger_factory, StateInterface $state) {
$this->workspaceManager = $workspace_manager;
$this->uuidIndex = $uuid_index;
$this->revIndex = $rev_index;
$this->entityTypeManager = $entity_type_manager;
$this->lock = $lock;
$this->logger = $logger_factory
->get('replication');
$this->state = $state;
}
/**
* @inheritDoc
*/
public function get(WorkspaceInterface $workspace) {
if (!isset($this->instances[$workspace
->id()])) {
$this->instances[$workspace
->id()] = new BulkDocs($this->workspaceManager, $workspace, $this->uuidIndex, $this->revIndex, $this->entityTypeManager, $this->lock, $this->logger, $this->state);
}
return $this->instances[$workspace
->id()];
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
BulkDocsFactory:: |
protected | property | ||
BulkDocsFactory:: |
protected | property | ||
BulkDocsFactory:: |
protected | property | ||
BulkDocsFactory:: |
protected | property | ||
BulkDocsFactory:: |
protected | property | ||
BulkDocsFactory:: |
protected | property | The state service. | |
BulkDocsFactory:: |
protected | property | ||
BulkDocsFactory:: |
protected | property | ||
BulkDocsFactory:: |
public | function |
@inheritDoc Overrides BulkDocsFactoryInterface:: |
|
BulkDocsFactory:: |
public | function | Constructor. |