protected function Index::setHasReindexed in Search API 8
Sets whether this index has all items marked for re-indexing.
Parameters
bool $has_reindexed: (optional) TRUE if the index has all items marked for re-indexing, FALSE otherwise.
Return value
$this
5 calls to Index::setHasReindexed()
- Index::clear in src/
Entity/ Index.php - Clears all indexed data from this index and marks it for reindexing.
- Index::indexSpecificItems in src/
Entity/ Index.php - Indexes some objects on this index.
- Index::postSave in src/
Entity/ Index.php - Acts on a saved entity before the insert or update hook is invoked.
- Index::rebuildTracker in src/
Entity/ Index.php - Starts a rebuild of the index's tracking information.
- Index::reindex in src/
Entity/ Index.php - Marks all items in this index for reindexing.
File
- src/
Entity/ Index.php, line 1200
Class
- Index
- Defines the search index configuration entity.
Namespace
Drupal\search_api\EntityCode
protected function setHasReindexed($has_reindexed = TRUE) {
if ($this
->isReindexing() !== $has_reindexed) {
$key = "search_api.index.{$this->id()}.has_reindexed";
\Drupal::state()
->set($key, $has_reindexed);
}
return $this;
}