You are here

public function ScanResultController::analyse in Upgrade Status 8

Analyze a specific project in its own HTTP request.

Parameters

string $type: Type of the extension, it can be either 'module' or 'theme' or 'profile'.

string $project_machine_name: The machine name of the project.

Return value

\Symfony\Component\HttpFoundation\JsonResponse Response object.

1 string reference to 'ScanResultController::analyse'
upgrade_status.routing.yml in ./upgrade_status.routing.yml
upgrade_status.routing.yml

File

src/Controller/ScanResultController.php, line 133

Class

ScanResultController

Namespace

Drupal\upgrade_status\Controller

Code

public function analyse(string $type, string $project_machine_name) {
  $extension = $this->projectCollector
    ->loadProject($type, $project_machine_name);
  \Drupal::service('upgrade_status.deprecation_analyser')
    ->analyse($extension);
  return new JsonResponse([
    'message' => $this
      ->t('Scanned @project', [
      '@project' => $extension
        ->getName(),
    ]),
  ]);
}