class ChangesFactory in Replication 8
Same name and namespace in other branches
- 8.2 src/ChangesFactory.php \Drupal\replication\ChangesFactory
Hierarchy
- class \Drupal\replication\ChangesFactory implements ChangesFactoryInterface
Expanded class hierarchy of ChangesFactory
1 string reference to 'ChangesFactory'
1 service uses ChangesFactory
File
- src/
ChangesFactory.php, line 12
Namespace
Drupal\replicationView source
class ChangesFactory implements ChangesFactoryInterface {
/**
* @var \Drupal\multiversion\Entity\Index\SequenceIndexInterface
*/
protected $sequenceIndex;
/**
* @var \Drupal\Core\Entity\EntityTypeManagerInterface
*/
protected $entityTypeManager;
/**
* @var \Symfony\Component\Serializer\SerializerInterface
*/
protected $serializer;
/**
* @var \Drupal\replication\Plugin\ReplicationFilterManagerInterface
*/
protected $filterManager;
/**
* @var \Drupal\replication\Changes\Changes[]
*/
protected $instances = [];
/**
* @param \Drupal\multiversion\Entity\Index\SequenceIndexInterface $sequence_index
* @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
* @param \Symfony\Component\Serializer\SerializerInterface $serializer
* @param \Drupal\replication\Plugin\ReplicationFilterManagerInterface $filter_manager
*/
public function __construct(SequenceIndexInterface $sequence_index, EntityTypeManagerInterface $entity_type_manager, SerializerInterface $serializer, ReplicationFilterManagerInterface $filter_manager) {
$this->sequenceIndex = $sequence_index;
$this->entityTypeManager = $entity_type_manager;
$this->serializer = $serializer;
$this->filterManager = $filter_manager;
}
/**
* {@inheritdoc}
*/
public function get(WorkspaceInterface $workspace) {
if (!isset($this->instances[$workspace
->id()])) {
$this->instances[$workspace
->id()] = new Changes($this->sequenceIndex, $workspace, $this->entityTypeManager, $this->serializer, $this->filterManager);
}
return $this->instances[$workspace
->id()];
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ChangesFactory:: |
protected | property | ||
ChangesFactory:: |
protected | property | ||
ChangesFactory:: |
protected | property | ||
ChangesFactory:: |
protected | property | ||
ChangesFactory:: |
protected | property | ||
ChangesFactory:: |
public | function |
Constructs a new Changes instance. Overrides ChangesFactoryInterface:: |
|
ChangesFactory:: |
public | function |