public function Index::isReindexing in Search API 8
Determines whether reindexing has been triggered in this page request.
Return value
bool TRUE if reindexing for this index has been triggered in this page request, and no items have been indexed since; FALSE otherwise. In other words, this returns FALSE if and only if calling reindex() on this index would have any effect (or if it is disabled).
Overrides IndexInterface::isReindexing
3 calls to Index::isReindexing()
- Index::clear in src/
Entity/ Index.php - Clears all indexed data from this index and marks it for reindexing.
- Index::reindex in src/
Entity/ Index.php - Marks all items in this index for reindexing.
- Index::setHasReindexed in src/
Entity/ Index.php - Sets whether this index has all items marked for re-indexing.
File
- src/
Entity/ Index.php, line 1186
Class
- Index
- Defines the search index configuration entity.
Namespace
Drupal\search_api\EntityCode
public function isReindexing() {
$key = "search_api.index.{$this->id()}.has_reindexed";
return \Drupal::state()
->get($key, FALSE);
}