amswap.module in Admin Menu Swap 8
Same filename and directory in other branches
Contains amswap.module.
File
amswap.moduleView source
<?php
/**
* @file
* Contains amswap.module.
*/
use Drupal\amswap\Render\Element\Amswap;
use Drupal\Core\Routing\RouteMatchInterface;
/**
* Implements hook_help().
*/
function amswap_help($route_name, RouteMatchInterface $route_match) {
if ($route_name === 'help.page.amswap') {
$output = '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('Allows the administration menu to be customised per user role.') . '</p>';
return $output;
}
}
/**
* Implements hook_toolbar_alter().
*/
function amswap_toolbar_alter(&$items) {
$items['administration']['tray']['toolbar_administration']['#pre_render'][] = [
Amswap::class,
'preRender',
];
}
Functions
Name | Description |
---|---|
amswap_help | Implements hook_help(). |
amswap_toolbar_alter | Implements hook_toolbar_alter(). |