You are here

public function WardenCommands::update in Warden 8

Same name and namespace in other branches
  1. 8.2 src/Commands/WardenCommands.php \Drupal\warden\Commands\WardenCommands::update()
  2. 3.x src/Commands/WardenCommands.php \Drupal\warden\Commands\WardenCommands::update()

Update Warden with the lastest site data

@command warden:update @aliases warden-update

File

src/Commands/WardenCommands.php, line 58

Class

WardenCommands
A Drush commandfile.

Namespace

Drupal\warden\Commands

Code

public function update() {
  drush_print(dt('Going to update Warden ...'));
  try {
    $warden_manager = \Drupal::service('warden.manager');
    $warden_manager
      ->updateWarden();
    drush_print(dt('... success'));
  } catch (Exception $e) {
    return drush_set_error($e
      ->getMessage());
  }
}