You are here

final class QueryPreExecuteEvent in Search API 8

Same name in this branch
  1. 8 src/Event/QueryPreExecuteEvent.php \Drupal\search_api\Event\QueryPreExecuteEvent
  2. 8 modules/search_api_db/src/Event/QueryPreExecuteEvent.php \Drupal\search_api_db\Event\QueryPreExecuteEvent

Wraps a query pre-execute event.

Hierarchy

  • class \Drupal\search_api\Event\QueryPreExecuteEvent extends \Symfony\Component\EventDispatcher\Event

Expanded class hierarchy of QueryPreExecuteEvent

2 files declare their use of QueryPreExecuteEvent
EventListener.php in tests/search_api_test_events/src/EventListener.php
Query.php in src/Query/Query.php

File

src/Event/QueryPreExecuteEvent.php, line 11

Namespace

Drupal\search_api\Event
View source
final class QueryPreExecuteEvent extends Event {

  /**
   * The created query.
   *
   * @var \Drupal\search_api\Query\QueryInterface
   */
  protected $query;

  /**
   * Constructs a new class instance.
   *
   * @param \Drupal\search_api\Query\QueryInterface $query
   *   The created query.
   */
  public function __construct(QueryInterface $query) {
    $this->query = $query;
  }

  /**
   * Retrieves the created query.
   *
   * @return \Drupal\search_api\Query\QueryInterface
   *   The created query.
   */
  public function getQuery() {
    return $this->query;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
QueryPreExecuteEvent::$query protected property The created query.
QueryPreExecuteEvent::getQuery public function Retrieves the created query.
QueryPreExecuteEvent::__construct public function Constructs a new class instance.