You are here

abstract class ConflictDiscoveryBase in Conflict 8.2

Hierarchy

Expanded class hierarchy of ConflictDiscoveryBase

File

src/ConflictDiscovery/ConflictDiscoveryBase.php, line 9

Namespace

Drupal\conflict\ConflictDiscovery
View source
abstract class ConflictDiscoveryBase implements ConflictDiscoveryInterface {

  /**
   * Discovers conflicts on entities.
   *
   * @param \Drupal\conflict\Event\EntityConflictDiscoveryEvent
   *   The entity conflict discovery event.
   */
  public function discoverConflicts(EntityConflictDiscoveryEvent $event) {
    $local_entity = $event
      ->getLocalEntity();
    if ($local_entity instanceof ContentEntityInterface) {
      $this
        ->discoverConflictsContentEntity($event);
    }
  }

  /**
   * {@inheritdoc}
   */
  public static function getSubscribedEvents() {
    $events[EntityConflictEvents::ENTITY_CONFLICT_DISCOVERY][] = [
      'discoverConflicts',
    ];
    return $events;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ConflictDiscoveryBase::discoverConflicts public function Discovers conflicts on entities.
ConflictDiscoveryBase::getSubscribedEvents public static function Returns an array of event names this subscriber wants to listen to.
ConflictDiscoveryInterface::discoverConflictsContentEntity public function Discovers conflicts on content entities. 1