public function Index::stopBatchTracking in Search API 8
Stop the latest initialized "batch tracking" mode for the index.
Note that the index might remain in "batch tracking" mode if startBatchTracking() was called multiple times. You have to take care to always call the two methods the same number of times.
Return value
$this
Throws
\Drupal\search_api\SearchApiException Thrown if the index wasn't in "batch tracking" mode before.
Overrides IndexInterface::stopBatchTracking
See also
\Drupal\search_api\IndexInterface::startBatchTracking
File
- src/
Entity/ Index.php, line 1047
Class
- Index
- Defines the search index configuration entity.
Namespace
Drupal\search_api\EntityCode
public function stopBatchTracking() {
if (!$this->batchTracking) {
throw new SearchApiException('Trying to leave "batch tracking" mode on index "' . $this
->label() . '" which was not entered first.');
}
$this->batchTracking--;
return $this;
}