You are here

public function ImceController::adminOverview in IMCE 8

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

Returns an administrative overview of Imce Profiles.

1 string reference to 'ImceController::adminOverview'
imce.routing.yml in ./imce.routing.yml
imce.routing.yml

File

src/Controller/ImceController.php, line 18

Class

ImceController
Controller routines for imce routes.

Namespace

Drupal\imce\Controller

Code

public function adminOverview(Request $request) {

  // Build the settings form first.(may redirect)
  $output['settings_form'] = $this
    ->formBuilder()
    ->getForm('Drupal\\imce\\Form\\ImceSettingsForm') + [
    '#weight' => 10,
  ];

  // Buld profile list.
  $output['profile_list'] = [
    '#type' => 'container',
    '#attributes' => [
      'class' => [
        'imce-profile-list',
      ],
    ],
    'title' => [
      '#markup' => '<h2>' . $this
        ->t('Configuration Profiles') . '</h2>',
    ],
    'list' => $this
      ->entityTypeManager()
      ->getListBuilder('imce_profile')
      ->render(),
  ];
  return $output;
}