+
+ return true;
+ }
+
+ protected function getUpdates($module = null)
+ {
+ $start = $this->getUpdateList();
+ if ($module) {
+ if (isset($start[$module])) {
+ $start = [
+ $module => $start[$module]
+ ];
+ } else {
+ $start = [];
+ }
+ }
+
+ return $start;
+ }
+
+ // Copy of protected \Drupal\system\Controller\DbUpdateController::getModuleUpdates.
+ protected function getUpdateList()
+ {
+ $start = [];
+ $updates = update_get_update_list();
+ foreach ($updates as $module => $update) {
+ $start[$module] = $update['start'];
+ }
+
+ return $start;
+ }
+
+ private function executeUpdate($function, &$context)
+ {
+ if (!$context || !array_key_exists('sandbox', $context)) {
+ $context['sandbox'] = [];
+ }
+
+ if (function_exists($function)) {
+ $function($context['sandbox']);
+ }
+
+ return true;