You are here

public function SharebarController::admin in ShareBar 8

Provide a single block from the administration menu as a page.

1 string reference to 'SharebarController::admin'
sharebar.routing.yml in ./sharebar.routing.yml
sharebar.routing.yml

File

src/Controller/SharebarController.php, line 20
Contains \Drupal\page_example\Controller\PageExampleController.

Class

SharebarController
Controller routines for sharebar routes.

Namespace

Drupal\sharebar\Controller

Code

public function admin() {
  $item = menu_get_item();
  if ($content = system_admin_menu_block($item)) {
    $output = theme('admin_block_content', array(
      'content' => $content,
    ));
  }
  else {
    $output = t('You do not have any administrative items.');
  }
  return $output;
}