protected function LatestRevisionUpdateRunner::getEntityIdsReferencingReadyUpdates in Scheduled Updates 8
This method is overridden because the version in BaseUpdateRunner only needs to get default revisions so does not call $query->allRevisions().
$query->condition("$field_id.entity.update_timestamp", $all_ready_update_ids, 'IN');
Overrides BaseUpdateRunner::getEntityIdsReferencingReadyUpdates
File
- src/
Plugin/ UpdateRunner/ LatestRevisionUpdateRunner.php, line 41 - Contains \Drupal\scheduled_updates\Plugin\UpdateRunner\LatestRevisionUpdateRunner
Class
- LatestRevisionUpdateRunner
- The Latest Revision Update Runner.
Namespace
Drupal\scheduled_updates\Plugin\UpdateRunnerCode
protected function getEntityIdsReferencingReadyUpdates() {
$entity_ids = [];
if ($field_ids = $this
->getReferencingFieldIds()) {
$entity_storage = $this->entityTypeManager
->getStorage($this
->updateEntityType());
$all_ready_update_ids = $this
->getReadyUpdateIds();
if ($all_ready_update_ids) {
foreach ($field_ids as $field_id) {
$query = $entity_storage
->getQuery('AND');
$query
->condition("{$field_id}.target_id", $all_ready_update_ids, 'IN');
$query
->allRevisions();
$entity_ids += $query
->execute();
}
}
}
return $entity_ids;
}