Chris@0: container->get('state')->set($module . '.db_updates.' . $group, $index); Chris@0: } Chris@0: Chris@0: /** Chris@0: * Applies any pending DB updates through the Update UI. Chris@0: */ Chris@0: protected function applyUpdates() { Chris@0: $this->drupalGet(Url::fromRoute('system.db_update')); Chris@0: $this->clickLink($this->t('Continue')); Chris@0: $this->clickLink($this->t('Apply pending updates')); Chris@0: } Chris@0: Chris@0: /** Chris@0: * Conditionally load Update API functions for the specified group. Chris@0: * Chris@0: * @param string $module Chris@0: * The name of the module defining the update functions. Chris@0: * @param string $group Chris@0: * A name identifying the group of update functions to enable. Chris@0: */ Chris@0: public static function includeUpdates($module, $group) { Chris@0: if ($index = \Drupal::state()->get($module . '.db_updates.' . $group)) { Chris@0: module_load_include('inc', $module, 'update/' . $group . '_' . $index); Chris@0: } Chris@0: } Chris@0: Chris@0: }