You are here

public function UpdateRunnerUtils::invokeEntityUpdate in Scheduled Updates 8

File

src/UpdateRunnerUtils.php, line 143
Contains \Drupal\scheduled_updates\UpdateRunnerUtils.

Class

UpdateRunnerUtils
A service that runs all available updaters

Namespace

Drupal\scheduled_updates

Code

public function invokeEntityUpdate(ContentEntityInterface $entity) {
  $runners = $this
    ->getUpdateTypeRunners();
  foreach ($runners as $runner) {
    if ($runner instanceof EntityMonitorUpdateRunnerInterface && $runner
      ->updateEntityType() == $entity
      ->getEntityTypeId()) {

      // Check to see if update reference fields have changed.
      if ($this
        ->entityUpdatesChanged($entity, $runner)) {
        $runner
          ->onEntityUpdate($entity);
        break;
      }
    }
  }
}