Repository URL to install this package:
|
Version:
2.0.11 ▾
|
<?php
namespace Drupal\dds\Controller;
use Drupal\system\Controller\SystemController;
class UtilitiesAdminController extends SystemController {
public function utilitiesPage() {
$block_contents = $this->systemManager->getBlockContents();
$build = [];
// If the block has #markup array key, it means it is showing the message
// about not having any items.
// As we don't want the list displayed if there are no items, we handle
// it ourselves.
if (!isset($block_contents['#markup'])) {
$build['pages'] = [
'#type' => 'fieldset',
'#open' => TRUE,
'#title' => $this->t('Utility specific pages'),
'pages' => $block_contents
];
}
$form = \Drupal::formBuilder()->getForm('Drupal\dds\Form\EnableUtilitiesForm');
$build['form'] = $form;
return $build;
}
}