final class IndexingItemsEvent in Search API 8
Wraps an indexing items event.
Hierarchy
- class \Drupal\search_api\Event\IndexingItemsEvent extends \Symfony\Component\EventDispatcher\Event
Expanded class hierarchy of IndexingItemsEvent
3 files declare their use of IndexingItemsEvent
- BackendTest.php in modules/
search_api_db/ tests/ src/ Kernel/ BackendTest.php - EventListener.php in tests/
search_api_test_events/ src/ EventListener.php - Index.php in src/
Entity/ Index.php
File
- src/
Event/ IndexingItemsEvent.php, line 11
Namespace
Drupal\search_api\EventView source
final class IndexingItemsEvent extends Event {
/**
* The index on which items will be indexed.
*
* @var \Drupal\search_api\IndexInterface
*/
protected $index;
/**
* The items that will be indexed.
*
* @var \Drupal\search_api\Item\ItemInterface[]
*/
protected $items;
/**
* Constructs a new class instance.
*
* @param \Drupal\search_api\IndexInterface $index
* The index on which items will be indexed.
* @param \Drupal\search_api\Item\ItemInterface[] $items
* The items that will be indexed.
*/
public function __construct(IndexInterface $index, array $items) {
$this->index = $index;
$this->items = $items;
}
/**
* Retrieves the index on which items will be indexed.
*
* @return \Drupal\search_api\IndexInterface
* The index on which items will be indexed.
*/
public function getIndex() {
return $this->index;
}
/**
* Retrieves the items that will be indexed.
*
* @return \Drupal\search_api\Item\ItemInterface[]
* The items that will be indexed.
*/
public function getItems() {
return $this->items;
}
/**
* Sets the items that will be indexed.
*
* @param \Drupal\search_api\Item\ItemInterface[] $items
* The new items that will be indexed.
*/
public function setItems(array $items) {
$this->items = $items;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
IndexingItemsEvent:: |
protected | property | The index on which items will be indexed. | |
IndexingItemsEvent:: |
protected | property | The items that will be indexed. | |
IndexingItemsEvent:: |
public | function | Retrieves the index on which items will be indexed. | |
IndexingItemsEvent:: |
public | function | Retrieves the items that will be indexed. | |
IndexingItemsEvent:: |
public | function | Sets the items that will be indexed. | |
IndexingItemsEvent:: |
public | function | Constructs a new class instance. |