You are here

function minisite_asset_field_bundles_info in Mini site 7

Return minisite information with bundled entities.

1 call to minisite_asset_field_bundles_info()
minisite_asset_field_info in includes/minisite.func.inc
Return minisite field name by given bundle name.

File

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

Code

function minisite_asset_field_bundles_info($entity_type = 'node') {
  $minisite_bundles =& drupal_static(__FUNCTION__);
  if (!isset($minisite_bundles)) {
    $minisite_bundles = array();
  }
  if (!isset($minisite_bundles[$entity_type])) {
    $minisite_fields = minisite_asset_fields_info('minisite', $entity_type);
    foreach ($minisite_fields as $minisite_field) {
      foreach ($minisite_field['bundles'][$entity_type] as $bundle) {
        if (!empty($bundle)) {
          $minisite_bundles[$entity_type][$bundle] = $minisite_field['field_name'];
        }
      }
    }
  }
  return $minisite_bundles;
}