public function ConfigInspectorController::download in Configuration Inspector 8
Download raw data.
Parameters
string $name: Configuration name.
Return value
\Symfony\Component\HttpFoundation\Response Return config as a response yaml file.
1 string reference to 'ConfigInspectorController::download'
File
- src/
Controller/ ConfigInspectorController.php, line 293
Class
- ConfigInspectorController
- Defines a controller for the config_inspector module.
Namespace
Drupal\config_inspector\ControllerCode
public function download($name) {
$data = $this->configInspectorManager
->getConfigData($name);
$data = Yaml::encode($data);
$headers = [
'Content-disposition' => 'attachment; filename="' . $name . '.yml"',
];
return new Response($data, 200, $headers);
}