public function BlockListController::listing in Drupal 9
Same name and namespace in other branches
- 8 core/modules/block/src/Controller/BlockListController.php \Drupal\block\Controller\BlockListController::listing()
Shows the block administration page.
Parameters
string|null $theme: Theme key of block list.
\Symfony\Component\HttpFoundation\Request $request: The current request.
Return value
array A render array as expected by \Drupal\Core\Render\RendererInterface::render().
Overrides EntityListController::listing
1 string reference to 'BlockListController::listing'
- block.routing.yml in core/
modules/ block/ block.routing.yml - core/modules/block/block.routing.yml
File
- core/
modules/ block/ src/ Controller/ BlockListController.php, line 54
Class
- BlockListController
- Defines a controller to list blocks.
Namespace
Drupal\block\ControllerCode
public function listing($theme = NULL, Request $request = NULL) {
$theme = $theme ?: $this
->config('system.theme')
->get('default');
if (!$this->themeHandler
->hasUi($theme)) {
throw new NotFoundHttpException();
}
return $this
->entityTypeManager()
->getListBuilder('block')
->render($theme, $request);
}