You are here

public function SearchApiDate::getTimeService in Search API 8

Retrieves the time service.

Return value

\Drupal\Component\Datetime\TimeInterface The time service.

File

src/Plugin/views/filter/SearchApiDate.php, line 32

Class

SearchApiDate
Defines a filter for filtering on dates.

Namespace

Drupal\search_api\Plugin\views\filter

Code

public function getTimeService() {
  return $this->timeService ?: \Drupal::time();
}