You are here

protected function TestTaskWorker::logEvent in Search API 8

Logs an event.

Parameters

\Drupal\search_api\Task\TaskEvent $event: The event.

3 calls to TestTaskWorker::logEvent()
TestTaskWorker::fail in tests/search_api_test_tasks/src/TestTaskWorker.php
Handles a task event with an exception.
TestTaskWorker::ignore in tests/search_api_test_tasks/src/TestTaskWorker.php
Ignores a task event.
TestTaskWorker::success in tests/search_api_test_tasks/src/TestTaskWorker.php
Handles a task event successfully.

File

tests/search_api_test_tasks/src/TestTaskWorker.php, line 101

Class

TestTaskWorker
Provides a task worker for testing purposes.

Namespace

Drupal\search_api_test_tasks

Code

protected function logEvent(TaskEvent $event) {
  $this->eventLog[] = $event
    ->getTask()
    ->toArray();
}