2 * Implements hook_field_info_max_weight().
4 function {{ machine_name }}_field_info_max_weight($entity_type, $bundle, $context) {
7 foreach (my_module_entity_additions($entity_type, $bundle, $context) as $addition) {
8 $weights[] = $addition['weight'];
11 return $weights ? max($weights) : NULL;