You are here

public function TestBackend::getDiscouragedProcessors in Search API 8

Limits the processors displayed in the UI for indexes on this server.

Returns an array of processor IDs that should not be enabled for this backend. It is a bad idea, for example, to have the "Tokenizer" processor enabled when using a Solr backend.

Return value

string[] A list of processor IDs.

Overrides BackendPluginBase::getDiscouragedProcessors

File

tests/search_api_test/src/Plugin/search_api/backend/TestBackend.php, line 288

Class

TestBackend
Provides a dummy backend for testing purposes.

Namespace

Drupal\search_api_test\Plugin\search_api\backend

Code

public function getDiscouragedProcessors() {
  if ($override = $this
    ->getMethodOverride(__FUNCTION__)) {

    // Safeguard against "stupid" dummy methods used in tests, such as
    // \Drupal\search_api_test\MethodOverrides::overrideTestBackendMethod().
    $ret = call_user_func($override, $this);
    return is_array($ret) ? $ret : [];
  }
  return $this
    ->getReturnValue(__FUNCTION__, []);
}