You are here

protected function ServerTaskManager::getTaskConditions in Search API 8

Gets a set of conditions for finding the tracking tasks of the given index.

Parameters

\Drupal\search_api\ServerInterface $server: The server for which to retrieve tasks.

Return value

array An array of conditions to pass to the Search API task manager.

4 calls to ServerTaskManager::getTaskConditions()
ServerTaskManager::delete in src/Task/ServerTaskManager.php
Removes pending server tasks from the list.
ServerTaskManager::execute in src/Task/ServerTaskManager.php
Checks for pending tasks on one or all enabled search servers.
ServerTaskManager::getCount in src/Task/ServerTaskManager.php
Retrieves the number of pending server tasks.
ServerTaskManager::setExecuteBatch in src/Task/ServerTaskManager.php
Sets a batch for executing server tasks.

File

src/Task/ServerTaskManager.php, line 212

Class

ServerTaskManager
Provides a service for managing pending server tasks.

Namespace

Drupal\search_api\Task

Code

protected function getTaskConditions(ServerInterface $server = NULL) {
  $conditions['type'] = static::getSupportedTypes();
  if ($server) {
    $conditions['server_id'] = $server
      ->id();
  }
  return $conditions;
}