You are here

function farm_location_entity_base_field_info in farmOS 2.x

Implements hook_entity_base_field_info().

File

modules/core/location/farm_location.module, line 30
Contains farm_location.module.

Code

function farm_location_entity_base_field_info(EntityTypeInterface $entity_type) {
  module_load_include('inc', 'farm_location', 'farm_location.base_fields');
  switch ($entity_type
    ->id()) {

    // Build asset base fields.
    case 'asset':
      return farm_location_asset_base_fields();

    // Build log base fields.
    case 'log':
      return farm_location_log_base_fields();
    default:
      return [];
  }
}