You are here

public function BUEditorController::adminOverview in BUEditor 8

Same name and namespace in other branches
  1. 8.2 src/Controller/BUEditorController.php \Drupal\bueditor\Controller\BUEditorController::adminOverview()

Returns an administrative overview of BUEditor Editors.

1 string reference to 'BUEditorController::adminOverview'
bueditor.routing.yml in ./bueditor.routing.yml
bueditor.routing.yml

File

src/Controller/BUEditorController.php, line 15

Class

BUEditorController
Controller routines for bueditor routes.

Namespace

Drupal\bueditor\Controller

Code

public function adminOverview() {
  $output['editors'] = [
    '#type' => 'container',
    '#attributes' => [
      'class' => [
        'bueditor-editor-list',
      ],
    ],
    'title' => [
      '#markup' => '<h2>' . $this
        ->t('Available editors') . '</h2>',
    ],
    'list' => $this
      ->entityTypeManager()
      ->getListBuilder('bueditor_editor')
      ->render(),
  ];
  $output['#attached']['library'][] = 'bueditor/drupal.bueditor.admin';
  return $output;
}