2 * Implements hook_entity_view_alter().
4 function {{ machine_name }}_entity_view_alter(&$build, $type) {
5 if ($build['#view_mode'] == 'full' && isset($build['an_additional_field'])) {
7 $build['an_additional_field']['#weight'] = -10;
9 // Add a #post_render callback to act on the rendered HTML of the entity.
10 $build['#post_render'][] = 'my_module_node_post_render';