class RevisionDiffFactory in Replication 8.2
Same name and namespace in other branches
- 8 src/RevisionDiffFactory.php \Drupal\replication\RevisionDiffFactory
Hierarchy
- class \Drupal\replication\RevisionDiffFactory implements RevisionDiffFactoryInterface
Expanded class hierarchy of RevisionDiffFactory
1 string reference to 'RevisionDiffFactory'
1 service uses RevisionDiffFactory
File
- src/
RevisionDiffFactory.php, line 9
Namespace
Drupal\replicationView source
class RevisionDiffFactory implements RevisionDiffFactoryInterface {
/**
* @var \Drupal\multiversion\Entity\Index\RevisionIndexInterface
*/
protected $revIndex;
/**
* @var \Drupal\replication\RevisionDiff\RevisionDiffInterface[]
*/
protected $instances = [];
/**
* @param \Drupal\multiversion\Entity\Index\RevisionIndexInterface $rev_index
*/
public function __construct(RevisionIndexInterface $rev_index) {
$this->revIndex = $rev_index;
}
/**
* @inheritDoc
*/
public function get(WorkspaceInterface $workspace) {
if (!isset($this->instances[$workspace
->id()])) {
$this->instances[$workspace
->id()] = new RevisionDiff($this->revIndex, $workspace);
}
return $this->instances[$workspace
->id()];
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
RevisionDiffFactory:: |
protected | property | ||
RevisionDiffFactory:: |
protected | property | ||
RevisionDiffFactory:: |
public | function |
@inheritDoc Overrides RevisionDiffFactoryInterface:: |
|
RevisionDiffFactory:: |
public | function |