function onlyone_admin_toolbar_help in Allow a content type only once (Only One) 8
Implements hook_help().
File
- modules/
onlyone_admin_toolbar/ onlyone_admin_toolbar.module, line 15 - Contains onlyone_admin_toolbar.module.
Code
function onlyone_admin_toolbar_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
// Main module help.
case 'help.page.onlyone_admin_toolbar':
$variables = [
':onlyone' => Url::fromRoute('help.page', [
'name' => 'onlyone',
])
->toString(),
':admin-toolbar' => Url::fromRoute('help.page', [
'name' => 'admin_toolbar_tools',
])
->toString(),
];
$output = '';
$output .= '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('The Allow a content type only once (Only One) for Admin Toolbar module comes packaged with the <a href=":onlyone">Allow a content type only once (Only One)</a> module and handles modifications to the <a href=":admin-toolbar">Admin Toolbar Extra Tools</a> menu entries related to the configured content types.', $variables) . '</p>';
$output .= '<h3>' . t('Uses') . '</h3>';
$output .= '<p>' . t('To use Allow a content type only once (Only One) for Admin Toolbar just install it like any other module. There is no other configuration required. When a content type is configured to have Only One content and a content exists for this content type, the content type name will be shown with the text "(Edit)" at the end in the menu: Content » Add content.') . '</p>';
return $output;
}
}