You are here

function minisite_asset_field_info in Mini site 7

Return minisite field name by given bundle name.

1 call to minisite_asset_field_info()
minisite_asset_field_name in includes/minisite.func.inc
Return minisite asset field name.

File

includes/minisite.func.inc, line 42
minisite.func.inc

Code

function minisite_asset_field_info($entity_type, $entity) {
  $minisite_bundles_tree = minisite_asset_field_bundles_info($entity_type);
  $minisite_bundles = array_keys($minisite_bundles_tree[$entity_type]);
  list(, , $bundle) = entity_extract_ids($entity_type, $entity);
  if (in_array($bundle, $minisite_bundles)) {
    return $minisite_bundles_tree[$bundle];
  }
  else {
    return FALSE;
  }
}