21c365e30b0aa9d3cd2f2414bbc5da6bb2c2de17
[yaffs-website] / vendor / chi-teck / drupal-code-generator / templates / d7 / hook / menu_contextual_links_alter.twig
1 /**
2  * Implements hook_menu_contextual_links_alter().
3  */
4 function {{ machine_name }}_menu_contextual_links_alter(&$links, $router_item, $root_path) {
5   // Add a link to all contextual links for nodes.
6   if ($root_path == 'node/%') {
7     $links['foo'] = array(
8       'title' => t('Do fu'),
9       'href' => 'foo/do',
10       'localized_options' => array(
11         'query' => array(
12           'foo' => 'bar',
13         ),
14       ),
15     );
16   }
17 }