function nodeorder_help in Node Order 8
Same name and namespace in other branches
- 6 nodeorder.module \nodeorder_help()
- 7 nodeorder.module \nodeorder_help()
Implements hook_help().
Related topics
File
- ./
nodeorder.module, line 264 - Nodeorder module.
Code
function nodeorder_help($route_name, RouteMatchInterface $route_match) {
$output = '';
switch ($route_name) {
case 'entity.taxonomy_vocabulary.overview_form':
/** @var \Drupal\nodeorder\NodeOrderManagerInterface $nodeorder_manager */
$nodeorder_manager = \Drupal::service('nodeorder.manager');
$vocabulary = $route_match
->getParameter('taxonomy_vocabulary');
if ($nodeorder_manager
->vocabularyIsOrderable($vocabulary
->id())) {
$output = '<p>' . t('%capital_name is an orderable vocabulary. You may order the nodes associated with a term within this vocabulary by clicking the down arrow in the <em class="placeholder">Edit</em> Button and selecting <em class="placeholder">Order</em>.', [
'%capital_name' => ucfirst($vocabulary
->label()),
]);
}
break;
case 'nodeorder.admin_order':
$output = '<p>' . t('This page provides a drag-and-drop interface for ordering nodes. To change the order of nodes, grab a drag-and-drop handle next to the <em class="placeholder">Title</em> column and drag the node to a new location in the list. Your changes will be saved only when you click the <em class="placeholder">Save</em> button at the bottom of the page.') . '</p>';
break;
}
return $output;
}