public function DefaultController::list in Block Blacklist [Deprecated] 8
List.
Return value
string Return list of all available block ids after processing.
1 string reference to 'DefaultController::list'
File
- src/
Controller/ DefaultController.php, line 86
Class
- DefaultController
- Class DefaultController.
Namespace
Drupal\block_blacklist\ControllerCode
public function list() {
$definitions = $this
->getList();
$header = [
$this
->t('Module'),
$this
->t('Label'),
$this
->t('Block ID'),
];
$rows = [];
foreach ($definitions as $id => $definition) {
$rows[] = [
$definition['provider'],
$definition['admin_label'],
$id,
];
}
return [
'#type' => 'table',
'#caption' => $this
->getCaption(),
'#header' => $header,
'#rows' => $rows,
];
}