2ce776504a1887f17753486906801ffdf7742961
[yaffs-website] / vendor / chi-teck / drupal-code-generator / templates / d7 / hook / block_view_alter.twig
1 /**
2  * Implements hook_block_view_alter().
3  */
4 function {{ machine_name }}_block_view_alter(&$data, $block) {
5   // Remove the contextual links on all blocks that provide them.
6   if (is_array($data['content']) && isset($data['content']['#contextual_links'])) {
7     unset($data['content']['#contextual_links']);
8   }
9   // Add a theme wrapper function defined by the current module to all blocks
10   // provided by the "somemodule" module.
11   if (is_array($data['content']) && $block->module == 'somemodule') {
12     $data['content']['#theme_wrappers'][] = 'mymodule_special_block';
13   }
14 }