You are here

protected function SearchApiAlgoliaBackend::isDebugActive in Search API Algolia 2.0.x

Same name and namespace in other branches
  1. 3.0.x src/Plugin/search_api/backend/SearchApiAlgoliaBackend.php \Drupal\search_api_algolia\Plugin\search_api\backend\SearchApiAlgoliaBackend::isDebugActive()

Wrapper function to check if debug mode is active or not as per config.

Return value

bool TRUE if debug mode is active.

1 call to SearchApiAlgoliaBackend::isDebugActive()
SearchApiAlgoliaBackend::indexItems in src/Plugin/search_api/backend/SearchApiAlgoliaBackend.php

File

src/Plugin/search_api/backend/SearchApiAlgoliaBackend.php, line 841

Class

SearchApiAlgoliaBackend
Class SearchApiAlgoliaBackend.

Namespace

Drupal\search_api_algolia\Plugin\search_api\backend

Code

protected function isDebugActive() {
  static $debug_active = NULL;
  if (is_null($debug_active)) {
    $debug_active = $this->configFactory
      ->get('search_api_algolia.settings')
      ->get('debug') ?? FALSE;
  }
  return $debug_active;
}