You are here

public function InPlaceUpdateController::update in Automatic Updates 8

Same name in this branch
  1. 8 src/Controller/InPlaceUpdateController.php \Drupal\automatic_updates\Controller\InPlaceUpdateController::update()
  2. 8 tests/modules/test_automatic_updates/src/Controller/InPlaceUpdateController.php \Drupal\test_automatic_updates\Controller\InPlaceUpdateController::update()

Builds the response.

1 string reference to 'InPlaceUpdateController::update'
test_automatic_updates.routing.yml in tests/modules/test_automatic_updates/test_automatic_updates.routing.yml
tests/modules/test_automatic_updates/test_automatic_updates.routing.yml

File

tests/modules/test_automatic_updates/src/Controller/InPlaceUpdateController.php, line 44

Class

InPlaceUpdateController
Returns responses for Test Automatic Updates routes.

Namespace

Drupal\test_automatic_updates\Controller

Code

public function update($project, $type, $from, $to) {
  $metadata = new UpdateMetadata($project, $type, $from, $to);
  $updated = $this->updater
    ->update($metadata);
  return [
    '#markup' => $updated ? $this
      ->t('Update successful') : $this
      ->t('Update Failed'),
  ];
}