public function RectorResultController::resultPage in Upgrade Rector 8
Builds content for patch review page/popup.
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
array Build array.
1 string reference to 'RectorResultController::resultPage'
File
- src/
Controller/ RectorResultController.php, line 77
Class
Namespace
Drupal\upgrade_rector\ControllerCode
public function resultPage(string $type, string $project_machine_name) {
$extension = $this->projectCollector
->loadProject($type, $project_machine_name);
// Extensions that don't have a project should be considered custom.
// Extensions that have the 'drupal' project are custom extensions
// that are running in a Drupal core git checkout, so also categorize
// them as custom.
$category = empty($extension->info['project']) || $extension->info['project'] === 'drupal' ? 'custom' : 'contrib';
$raw_rector_result = $this->rectorResults
->get($project_machine_name);
return $this->rectorProcessor
->formatResults($raw_rector_result, $extension, $category);
}