You are here

function hook_farm_ui_entity_view_groups in farmOS 7

Provide a group that entity Views can be sorted into.

Return value

array Returns an array of group information. Each element should have a unique key and an array of options, including: 'title' - The title of the group. This is optional. If it not provided then the Views will not be wrapped in a fieldset. 'weight' - The weight of the group relative to others. 'collapse' - Boolean that will cause the group fieldset to be collapsed.

Related topics

4 functions implement hook_farm_ui_entity_view_groups()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

farm_equipment_field_farm_ui_entity_view_groups in modules/farm/farm_equipment/farm_equipment_field/farm_equipment_field.module
Implements hook_farm_ui_entity_view_groups().
farm_movement_farm_ui_entity_view_groups in modules/farm/farm_movement/farm_movement.module
farm_sensor_farm_ui_entity_view_groups in modules/farm/farm_sensor/farm_sensor.module
Implements hook_farm_ui_entity_view_groups().
farm_ui_farm_ui_entity_view_groups in modules/farm/farm_ui/farm_ui.farm_ui.inc
Implements hook_farm_ui_groups().
1 invocation of hook_farm_ui_entity_view_groups()
farm_ui_entity_views in modules/farm/farm_ui/farm_ui.entity_views.inc
Build a renderable array of Views to add to a farmOS entity.

File

modules/farm/farm_ui/farm_ui.api.php, line 160
Hooks provided by farm_ui.

Code

function hook_farm_ui_entity_view_groups() {
  $groups = array(
    'assets' => array(
      'weight' => 98,
    ),
    'logs' => array(
      'weight' => 99,
    ),
    'other' => array(
      'weight' => 100,
      'collapse' => TRUE,
    ),
  );
  return $groups;
}