final class ReindexScheduledEvent in Search API 8
Wraps a reindex scheduled event.
Hierarchy
- class \Drupal\search_api\Event\ReindexScheduledEvent extends \Symfony\Component\EventDispatcher\Event
Expanded class hierarchy of ReindexScheduledEvent
3 files declare their use of ReindexScheduledEvent
- CommandHelper.php in src/
Utility/ CommandHelper.php - EventListener.php in tests/
search_api_test_events/ src/ EventListener.php - Index.php in src/
Entity/ Index.php
File
- src/
Event/ ReindexScheduledEvent.php, line 11
Namespace
Drupal\search_api\EventView source
final class ReindexScheduledEvent extends Event {
/**
* The index scheduled for reindexing.
*
* @var \Drupal\search_api\IndexInterface
*/
protected $index;
/**
* Boolean indicating whether the index was also cleared.
*
* @var bool
*/
protected $clear;
/**
* Constructs a new class instance.
*
* @param \Drupal\search_api\IndexInterface $index
* The index scheduled for reindexing.
* @param bool $clear
* Boolean indicating whether the index was also cleared.
*/
public function __construct(IndexInterface $index, $clear) {
$this->index = $index;
$this->clear = $clear;
}
/**
* Retrieves the index scheduled for reindexing.
*
* @return \Drupal\search_api\IndexInterface
* The index scheduled for reindexing.
*/
public function getIndex() {
return $this->index;
}
/**
* Retrieves a boolean indicating whether the index was also cleared.
*
* @return bool
* TRUE if the index was also cleared as part of the reindexing, FALSE
* otherwise.
*/
public function isClear() {
return $this->clear;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ReindexScheduledEvent:: |
protected | property | Boolean indicating whether the index was also cleared. | |
ReindexScheduledEvent:: |
protected | property | The index scheduled for reindexing. | |
ReindexScheduledEvent:: |
public | function | Retrieves the index scheduled for reindexing. | |
ReindexScheduledEvent:: |
public | function | Retrieves a boolean indicating whether the index was also cleared. | |
ReindexScheduledEvent:: |
public | function | Constructs a new class instance. |