ConflictDiscoveryBase.php in Conflict 8.2
File
src/ConflictDiscovery/ConflictDiscoveryBase.php
View source
<?php
namespace Drupal\conflict\ConflictDiscovery;
use Drupal\conflict\Event\EntityConflictDiscoveryEvent;
use Drupal\conflict\Event\EntityConflictEvents;
use Drupal\Core\Entity\ContentEntityInterface;
abstract class ConflictDiscoveryBase implements ConflictDiscoveryInterface {
public function discoverConflicts(EntityConflictDiscoveryEvent $event) {
$local_entity = $event
->getLocalEntity();
if ($local_entity instanceof ContentEntityInterface) {
$this
->discoverConflictsContentEntity($event);
}
}
public static function getSubscribedEvents() {
$events[EntityConflictEvents::ENTITY_CONFLICT_DISCOVERY][] = [
'discoverConflicts',
];
return $events;
}
}