You are here

public function MergeStrategyBase::isEnabled in Conflict 8.2

Checks whether this merge strategy is active for the conflict resolution.

Parameters

\Drupal\conflict\Event\EntityConflictResolutionEvent $event: The conflict resolution event.

Return value

bool TRUE, if the merge strategy is enabled. FALSE, if it is disabled.

Overrides MergeStrategyInterface::isEnabled

1 call to MergeStrategyBase::isEnabled()
MergeStrategyBase::resolveConflicts in src/ConflictResolution/MergeStrategyBase.php
Discovers conflicts on entities.

File

src/ConflictResolution/MergeStrategyBase.php, line 29

Class

MergeStrategyBase

Namespace

Drupal\conflict\ConflictResolution

Code

public function isEnabled(EntityConflictResolutionEvent $event) : bool {
  $disabled_merge_strategies = $event
    ->getContextParameter('merge_strategy.disabled', []);
  return !in_array($this
    ->getMergeStrategyId(), $disabled_merge_strategies, TRUE);
}