Skip to content

Commit

Permalink
Attempt to soften the dependency.
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-vessey committed Apr 9, 2024
1 parent 26e0b90 commit 7b226fd
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/EventSubscriber/EmbargoJoinProcessorEventSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,15 @@ public static function create(ContainerInterface $container) : self {
* {@inheritDoc}
*/
public static function getSubscribedEvents() {
return [
SearchApiSolrEvents::PRE_QUERY => 'preQuery',
];
$events = [];

if (class_exists(SearchApiSolrEvents::class)) {
$events += [
SearchApiSolrEvents::PRE_QUERY => 'preQuery',
];
}

return $events;
}

/**
Expand Down

0 comments on commit 7b226fd

Please sign in to comment.