function CssAssetController::deliver
File
-
core/
modules/ system/ src/ Controller/ CssAssetController.php, line 48
Class
- CssAssetController
- Defines a controller to serve CSS aggregates.
Namespace
Drupal\system\ControllerCode
public function deliver(Request $request, string $file_name) {
if ($request->query
->has('libraries') && !$request->query
->has('category')) {
throw new BadRequestHttpException('Category must be passed when libraries are passed.');
}
if ($request->query
->has('category') && !$request->query
->has('libraries')) {
throw new BadRequestHttpException('Libraries must be passed when category is passed.');
}
return parent::deliver($request, $file_name);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.