Pull merge.
[yaffs-website] / vendor / chi-teck / drupal-code-generator / templates / d7 / hook / comment_view_alter.twig
1 /**
2  * Implements hook_comment_view_alter().
3  */
4 function {{ machine_name }}_comment_view_alter(&$build) {
5   // Check for the existence of a field added by another module.
6   if ($build['#view_mode'] == 'full' && isset($build['an_additional_field'])) {
7     // Change its weight.
8     $build['an_additional_field']['#weight'] = -10;
9   }
10
11   // Add a #post_render callback to act on the rendered HTML of the comment.
12   $build['#post_render'][] = 'my_module_comment_post_render';
13 }