You are here

public function SearchSubscriber::initPlugin in Acquia Search Multiple Indexes 8

Parameters

\Solarium\Core\Client\Client $client:

array $options:

File

src/EventSubscriber/SearchSubscriber.php, line 24

Class

SearchSubscriber

Namespace

Drupal\acquia_search_multi_subs\EventSubscriber

Code

public function initPlugin($client, $options) {
  $this->client = $client;
  $this->options = $options;
  $dispatcher = $this->client
    ->getEventDispatcher();
  $dispatcher
    ->addListener(Events::PRE_EXECUTE_REQUEST, array(
    $this,
    'preExecuteRequest',
  ));
  $dispatcher
    ->addListener(Events::POST_EXECUTE_REQUEST, array(
    $this,
    'postExecuteRequest',
  ));
}