/**
  * Creating Listeners
  *
  * @param Backend $backend Backend
  *
  * @return void
  */
 protected function createListeners(Backend $backend)
 {
     parent::createListeners($backend);
     $events = $this->serviceLocator->get('SharedEventManager');
     // Spellcheck
     $config = $this->config->get('config');
     if (isset($config->Spelling->simple) && $config->Spelling->simple) {
         $dictionaries = ['basicSpell'];
     } else {
         $dictionaries = ['default', 'basicSpell'];
     }
     $spellingListener = new InjectSwissbibSpellingListener($backend, $dictionaries);
     $spellingListener->attach($events);
     $this->attachHighlightSolrConfigurator($backend);
 }
 protected function createListeners(Backend $backend)
 {
     parent::createListeners($backend);
     $events = $this->serviceLocator->get('SharedEventManager');
     // Spellcheck
     $config = $this->config->get('config');
     if (isset($config->Spelling->simple) && $config->Spelling->simple) {
         $dictionaries = array('basicSpell');
     } else {
         $dictionaries = array('default', 'basicSpell');
     }
     $spellingListener = new InjectSwissbibSpellingListener($backend, $dictionaries);
     $spellingListener->attach($events);
     /*
     $test =  $events->getListeners("VuFind\Search","post");
     foreach ($test as $tListener) {
         if (is_array( $tListener->getCallback()) && $tListener->getCallback()[0] instanceof VFSpellingListener) {
             $h = "";
             //$events->detach( "VuFind\Search",$tListener);
         }
     }
     */
     $this->attachHighlightSolrConfigurator($backend);
 }