You are here

public function Index::getTrackerId in Search API 8

Retrieves the tracker plugin's ID.

Return value

string The ID of the tracker plugin used by this index.

Overrides IndexInterface::getTrackerId

3 calls to Index::getTrackerId()
Index::getTrackerInstance in src/Entity/Index.php
Retrieves the tracker plugin.
Index::hasValidTracker in src/Entity/Index.php
Determines whether the tracker is valid.
Index::reactToTrackerSwitch in src/Entity/Index.php
Checks whether the index switched tracker plugin and reacts accordingly.

File

src/Entity/Index.php, line 436

Class

Index
Defines the search index configuration entity.

Namespace

Drupal\search_api\Entity

Code

public function getTrackerId() {
  if ($this->trackerInstance) {
    return $this->trackerInstance
      ->getPluginId();
  }
  if (empty($this->tracker_settings)) {
    return \Drupal::config('search_api.settings')
      ->get('default_tracker');
  }
  reset($this->tracker_settings);
  return key($this->tracker_settings);
}