You are here

public function ExecuteUpdates::execute in Automatic Updates 8

Handle database updates.

Return value

bool TRUE if database update was handled successfully, FALSE otherwise.

Overrides DatabaseUpdateHandlerInterface::execute

File

src/Plugin/DatabaseUpdateHandler/ExecuteUpdates.php, line 59

Class

ExecuteUpdates
Execute database updates.

Namespace

Drupal\automatic_updates\Plugin\DatabaseUpdateHandler

Code

public function execute() {
  $process = automatic_updates_console_command('updatedb');
  if ($errors = $process
    ->getErrorOutput()) {
    $this->logger
      ->error($errors);
    return FALSE;
  }
  return TRUE;
}