function field_tools_help in Field tools 8
Same name and namespace in other branches
- 7 field_tools.module \field_tools_help()
Implements hook_help().
File
- ./
field_tools.module, line 10 - field_tools.module Contains useful tools for working with fields.
Code
function field_tools_help($route_name, \Drupal\Core\Routing\RouteMatchInterface $route_match) {
switch ($route_name) {
// Main module help.
case 'help.page.field_tools':
return t("Field Tools provides additional UI admin tools for working with fields.");
}
// Clone form.
if (substr($route_name, -strlen('_field_tools_clone_form')) == '_field_tools_clone_form') {
return t('Apply this field to the other bundles by copying the current field.') . ' ' . t('Form and view display options will be copied to displays on the destination bundles where display mode names are the same as those on the source.');
}
// Bulk field clone form.
if (substr($route_name, 0, strlen('field_tools.field_bulk_clone_')) == 'field_tools.field_bulk_clone_') {
return t('Clone fields from this bundle to other bundles. Form and view display options will be copied to displays on the destination bundles where display mode names are the same as those on the source.');
}
// Bulk display clone form.
if (substr($route_name, 0, strlen('field_tools.displays_clone_')) == 'field_tools.displays_clone_') {
return t('Clone form and view displays from this bundle to other bundles. Field settings on the target are overwritten, except for fields only on the target, which are ignored.');
}
// Bulk field settings copy form.
if (substr($route_name, 0, strlen('field_tools.displays_settings_copy_')) == 'field_tools.displays_settings_copy_') {
return t("Copy settings for individual fields from this bundle's form and view displays to the displays with the same names other bundles.");
}
// TODO: update what follows for 8.x once the functionality is updated.
return;
// Provide help any path that ends in 'tools/clone-to'.
if (count($args_reverse) > 1 && $args_reverse[1] == 'tools' && $args_reverse[0] == 'clone-to') {
return t("Select the fields you want to copy this bundle. You can only select one instance of a particular field.");
}
}