WorkspaceMerger
class WorkspaceMerger implements WorkspaceMergerInterface (View source)
| internal |
Default implementation of the workspace merger.
Properties
| protected WorkspaceInterface | $sourceWorkspace | The source workspace entity. |
|
| protected WorkspaceInterface | $targetWorkspace | The target workspace entity. |
|
| protected EntityTypeManagerInterface | $entityTypeManager | The entity type manager. |
|
| protected Connection | $database | The database connection. |
|
| protected WorkspaceAssociationInterface | $workspaceAssociation | The workspace association service. |
|
| protected CacheTagsInvalidatorInterface | $cacheTagsInvalidator | The cache tag invalidator. |
Methods
Constructs a new WorkspaceMerger.
Merges the contents of the source workspace into the target workspace.
Returns the human-readable label of the source.
Returns the human-readable label of the target.
Checks if there are any conflicts between the source and the target.
Gets the revision identifiers for items which have changed on the target.
Gets the revision identifiers for items which have changed on the source.
Gets the total number of items which have changed on the target.
Gets the total number of items which have changed on the source.
Details
__construct(EntityTypeManagerInterface $entity_type_manager, Connection $database, WorkspaceAssociationInterface $workspace_association, CacheTagsInvalidatorInterface $cache_tags_invalidator, WorkspaceInterface $source, WorkspaceInterface $target)
Constructs a new WorkspaceMerger.
merge()
Merges the contents of the source workspace into the target workspace.
string
getSourceLabel()
Returns the human-readable label of the source.
string
getTargetLabel()
Returns the human-readable label of the target.
array
checkConflictsOnTarget()
Checks if there are any conflicts between the source and the target.
array
getDifferringRevisionIdsOnTarget()
Gets the revision identifiers for items which have changed on the target.
array
getDifferringRevisionIdsOnSource()
Gets the revision identifiers for items which have changed on the source.
int
getNumberOfChangesOnTarget()
Gets the total number of items which have changed on the target.
This returns the aggregated changes count across all entity types. For example, if two nodes and one taxonomy term have changed on the target, the return value is 3.
int
getNumberOfChangesOnSource()
Gets the total number of items which have changed on the source.
This returns the aggregated changes count across all entity types. For example, if two nodes and one taxonomy term have changed on the source, the return value is 3.