abstract class ConflictDiscoveryBase in Conflict 8.2
Hierarchy
- class \Drupal\conflict\ConflictDiscovery\ConflictDiscoveryBase implements ConflictDiscoveryInterface
Expanded class hierarchy of ConflictDiscoveryBase
File
- src/
ConflictDiscovery/ ConflictDiscoveryBase.php, line 9
Namespace
Drupal\conflict\ConflictDiscoveryView 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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ConflictDiscoveryBase:: |
public | function | Discovers conflicts on entities. | |
ConflictDiscoveryBase:: |
public static | function | Returns an array of event names this subscriber wants to listen to. | |
ConflictDiscoveryInterface:: |
public | function | Discovers conflicts on content entities. | 1 |