You are here

protected function BaseUpdateRunner::getReadyUpdateIds in Scheduled Updates 8

Get updates that are ready to be run for this Runner.

Parameters

array $update_ids: If given updates will be restrict to this array.

Return value

array Update ids.

3 calls to BaseUpdateRunner::getReadyUpdateIds()
EmbeddedUpdateRunner::getEmbeddedUpdates in src/Plugin/UpdateRunner/EmbeddedUpdateRunner.php
Return all schedule updates that are referenced via Entity Reference fields.
IndependentUpdateRunner::getReferencingUpdates in src/Plugin/UpdateRunner/IndependentUpdateRunner.php
Get all scheduled updates that referencing entities via Entity Reference Field
LatestRevisionUpdateRunner::getEntityIdsReferencingReadyUpdates in src/Plugin/UpdateRunner/LatestRevisionUpdateRunner.php
This method is overridden because the version in BaseUpdateRunner only needs to get default revisions so does not call $query->allRevisions().

File

src/Plugin/BaseUpdateRunner.php, line 583
Contains \Drupal\scheduled_updates\Plugin\BaseUpdateRunner.

Class

BaseUpdateRunner

Namespace

Drupal\scheduled_updates\Plugin

Code

protected function getReadyUpdateIds($update_ids = []) {
  $entity_storage = $this->entityTypeManager
    ->getStorage('scheduled_update');
  $query = $entity_storage
    ->getQuery('AND');
  $this
    ->addActiveUpdateConditions($query);
  if ($update_ids) {
    $query
      ->condition('id', $update_ids, 'IN');
  }
  return $query
    ->execute();
}