You are here

public function EntityConflictResolutionEvent::__construct in Conflict 8.2

Constructs a conflict discovery event object.

Parameters

\Drupal\Core\Entity\EntityInterface $local: The local part of the comparision - for example the entity built of the user input on an entity form submission. This is basically the active entity object.

\Drupal\Core\Entity\EntityInterface $remote: The remote part of the comparision - for example the current version of the entity from the storage.

\Drupal\Core\Entity\EntityInterface $base: The initial entity version in concurrent editing or the lowest common ancestor in a revision tree scenario.

\Drupal\Core\Entity\EntityInterface $result: The result entity, on which to apply the result. Usually this will be the active entity object - the local entity.

array $conflicts: The conflicts.

\Symfony\Component\HttpFoundation\ParameterBag $context: (optional) The context parameter bag.

Overrides EntityConflictDiscoveryEvent::__construct

File

src/Event/EntityConflictResolutionEvent.php, line 38

Class

EntityConflictResolutionEvent

Namespace

Drupal\conflict\Event

Code

public function __construct(EntityInterface $local, EntityInterface $remote, EntityInterface $base, EntityInterface $result, array $conflicts, ParameterBag $context = NULL) {
  parent::__construct($local, $remote, $base, $context);
  $this->conflicts = $conflicts;
  $this->resultEntity = $result;
}