You are here

public function Task::getServerId in Search API 8

Retrieves the ID of the search server associated with this task, if any.

Return value

string|null The search server ID, or NULL if there is none.

Overrides TaskInterface::getServerId

1 call to Task::getServerId()
Task::getServer in src/Entity/Task.php
Retrieves the search server associated with this task, if any.

File

src/Entity/Task.php, line 90

Class

Task
Defines the Search API task entity class.

Namespace

Drupal\search_api\Entity

Code

public function getServerId() {
  $field = $this
    ->get('server_id')[0];
  return $field ? $field->value : NULL;
}