You are here

public function SimpleMergeResolver::merge in Conflict 8

Merges three revisons.

Parameters

\Drupal\Core\Entity\RevisionableInterface $revision1:

\Drupal\Core\Entity\RevisionableInterface $revision2:

\Drupal\Core\Entity\RevisionableInterface $revision3:

Return value

mixed Last created revision's Id.

Overrides ConflictResolverInterface::merge

File

src/SimpleMergeResolver.php, line 19

Class

SimpleMergeResolver

Namespace

Drupal\conflict

Code

public function merge(RevisionableInterface $revision1, RevisionableInterface $revision2, RevisionableInterface $revision3) {
  $revid1 = $revision1
    ->getRevisionId();
  $revid2 = $revision2
    ->getRevisionId();
  $revid3 = $revision3
    ->getRevisionId();
  return max($revid1, $revid2, $revid3);
}