public function WorkspaceMerger::getNumberOfChangesOnSource in Drupal 9
Same name and namespace in other branches
- 8 core/modules/workspaces/src/WorkspaceMerger.php \Drupal\workspaces\WorkspaceMerger::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.
Return value
int The number of differing revisions.
Overrides WorkspaceOperationInterface::getNumberOfChangesOnSource
File
- core/
modules/ workspaces/ src/ WorkspaceMerger.php, line 204
Class
- WorkspaceMerger
- Default implementation of the workspace merger.
Namespace
Drupal\workspacesCode
public function getNumberOfChangesOnSource() {
$total_changes = $this
->getDifferringRevisionIdsOnSource();
return count($total_changes, COUNT_RECURSIVE) - count($total_changes);
}