final class ItemsIndexedEvent in Search API 8
Wraps an items indexed event.
Hierarchy
- class \Drupal\search_api\Event\ItemsIndexedEvent extends \Symfony\Component\EventDispatcher\Event
Expanded class hierarchy of ItemsIndexedEvent
2 files declare their use of ItemsIndexedEvent
- EventListener.php in tests/
search_api_test_events/ src/ EventListener.php - Index.php in src/
Entity/ Index.php
File
- src/
Event/ ItemsIndexedEvent.php, line 11
Namespace
Drupal\search_api\EventView source
final class ItemsIndexedEvent extends Event {
/**
* The index that indexed the items.
*
* @var \Drupal\search_api\IndexInterface
*/
protected $index;
/**
* The processed IDs.
*
* @var array
*/
protected $processedIds;
/**
* Constructs a new class instance.
*
* @param \Drupal\search_api\IndexInterface $index
* The index that indexed the items.
* @param int[] $processedIds
* The processed IDs.
*/
public function __construct(IndexInterface $index, array $processedIds) {
$this->index = $index;
$this->processedIds = $processedIds;
}
/**
* Retrieves the index that indexed the items.
*
* @return \Drupal\search_api\IndexInterface
* The used index.
*/
public function getIndex() {
return $this->index;
}
/**
* Retrieves the processed IDs.
*
* @return int[]
* An array containing the successfully indexed items' IDs.
*/
public function getProcessedIds() {
return $this->processedIds;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ItemsIndexedEvent:: |
protected | property | The index that indexed the items. | |
ItemsIndexedEvent:: |
protected | property | The processed IDs. | |
ItemsIndexedEvent:: |
public | function | Retrieves the index that indexed the items. | |
ItemsIndexedEvent:: |
public | function | Retrieves the processed IDs. | |
ItemsIndexedEvent:: |
public | function | Constructs a new class instance. |