function smart_date_recur_help in Smart Date 3.x
Same name and namespace in other branches
- 8.2 modules/smart_date_recur/smart_date_recur.module \smart_date_recur_help()
- 3.0.x modules/smart_date_recur/smart_date_recur.module \smart_date_recur_help()
- 3.1.x modules/smart_date_recur/smart_date_recur.module \smart_date_recur_help()
- 3.2.x modules/smart_date_recur/smart_date_recur.module \smart_date_recur_help()
- 3.3.x modules/smart_date_recur/smart_date_recur.module \smart_date_recur_help()
- 3.4.x modules/smart_date_recur/smart_date_recur.module \smart_date_recur_help()
Implements hook_help().
File
- modules/
smart_date_recur/ smart_date_recur.module, line 18 - Field hooks for a field that stores a start and end date as timestamps.
Code
function smart_date_recur_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
case 'help.page.smart_date_recur':
if (\Drupal::moduleHandler()
->moduleExists('field_ui')) {
$field_ui_link = Url::fromRoute('help.page', [
'name' => 'field_ui',
]);
}
else {
$field_ui_link = '#';
}
$output = '';
$output .= '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('The Smart Date Recur module adds recurring date functionality to Smart Date fields. For more information, see the <a href=":datetime_do">online documentation for the Smart Date module</a>.', [
':field' => Url::fromRoute('help.page', [
'name' => 'field',
]),
':field_ui' => $field_ui_link,
':datetime_do' => 'https://www.drupal.org/documentation/modules/smart_date',
]) . '</p>';
return $output;
}
}