You are here

function farm_movement_farm_ui_entity_views in farmOS 7

Implements hook_farm_ui_entity_views().

File

modules/farm/farm_movement/farm_movement.module, line 114
Farm movement.

Code

function farm_movement_farm_ui_entity_views($entity_type, $bundle, $entity) {
  $views = array();

  // Add asset movements View at the bottom of assets.
  if ($entity_type == 'farm_asset') {
    $views[] = array(
      'name' => 'farm_movement_log',
      'group' => 'logs_special',
      'weight' => 100,
    );
  }
  elseif ($entity_type == 'taxonomy_term' && $entity->vocabulary_machine_name == 'farm_areas') {
    $views[] = array(
      'name' => 'farm_area_assets',
      'group' => 'assets_history',
      'weight' => 100,
      'always' => TRUE,
    );
  }
  return $views;
}