class SharebarController in ShareBar 8
Controller routines for sharebar routes.
Hierarchy
- class \Drupal\sharebar\Controller\SharebarController
Expanded class hierarchy of SharebarController
File
- src/
Controller/ SharebarController.php, line 15 - Contains \Drupal\page_example\Controller\PageExampleController.
Namespace
Drupal\sharebar\ControllerView 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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
SharebarController:: |
public | function | ||
SharebarController:: |
public | function | Provide a single block from the administration menu as a page. | |
SharebarController:: |
public | function | ||
SharebarController:: |
public | function | ||
SharebarController:: |
public | function |