You are here

class SharebarController in ShareBar 8

Controller routines for sharebar routes.

Hierarchy

Expanded class hierarchy of SharebarController

File

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

Namespace

Drupal\sharebar\Controller
View source
class SharebarController {

  /**
   * Provide a single block from the administration menu as a page.
   */
  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;
  }
  public function admin_settings() {
    $form = \Drupal::formBuilder()
      ->getForm('Drupal\\sharebar\\Form\\SharebarSettingsForm');
    return $form;
  }
  public function add_button() {
    $form = \Drupal::formBuilder()
      ->getForm('Drupal\\sharebar\\Form\\SharebarAddButtonForm');
    return $form;
  }
  public function edit_button() {
    $form = \Drupal::formBuilder()
      ->getForm('Drupal\\sharebar\\Form\\SharebarAddButtonForm');
    return $form;
  }
  public function del_button() {
    $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;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
SharebarController::add_button public function
SharebarController::admin public function Provide a single block from the administration menu as a page.
SharebarController::admin_settings public function
SharebarController::del_button public function
SharebarController::edit_button public function