protected function AcsfDuplicationScrubEntityHandler::getBaseQuery in Acquia Cloud Site Factory Connector 8
Same name and namespace in other branches
- 8.2 src/Event/AcsfDuplicationScrubEntityHandler.php \Drupal\acsf\Event\AcsfDuplicationScrubEntityHandler::getBaseQuery()
Gets an initialized entity query instance.
When calling this function repeatedly, a filter is applied such that the query will return different IDs for each consecutive query.
Return value
\Drupal\Core\Entity\Query\QueryInterface The entity query instance.
2 calls to AcsfDuplicationScrubEntityHandler::getBaseQuery()
- AcsfDuplicationScrubNodeHandler::getBaseQuery in src/
Event/ AcsfDuplicationScrubNodeHandler.php - Gets an initialized entity query instance.
- AcsfDuplicationScrubUserHandler::getBaseQuery in src/
Event/ AcsfDuplicationScrubUserHandler.php - Gets an initialized entity query instance.
2 methods override AcsfDuplicationScrubEntityHandler::getBaseQuery()
- AcsfDuplicationScrubNodeHandler::getBaseQuery in src/
Event/ AcsfDuplicationScrubNodeHandler.php - Gets an initialized entity query instance.
- AcsfDuplicationScrubUserHandler::getBaseQuery in src/
Event/ AcsfDuplicationScrubUserHandler.php - Gets an initialized entity query instance.
File
- src/
Event/ AcsfDuplicationScrubEntityHandler.php, line 146
Class
- AcsfDuplicationScrubEntityHandler
- Handles the scrubbing of Drupal entities.
Namespace
Drupal\acsf\EventCode
protected function getBaseQuery() {
$entity_type = $this->entityTypeManager
->getDefinition($this->entityTypeId);
$entity_query = $this->entityTypeManager
->getStorage($this->entityTypeId)
->getQuery();
$var_name = 'acsf_duplication_scrubbed_' . $this->entityTypeId;
$last_processed_id = $this->acsfVarStorage
->get($var_name, -1);
if ($last_processed_id != -1) {
$entity_query
->condition($entity_type
->getKey('id'), $last_processed_id, '<');
}
return $entity_query;
}