function _multifield_get_usage_summary in Multifield 7
Same name and namespace in other branches
- 7.2 multifield.admin.inc \_multifield_get_usage_summary()
2 calls to _multifield_get_usage_summary()
- multifield_delete_form in ./
multifield.admin.inc - multifield_list_page in ./
multifield.admin.inc - @file Administation pages and forms for the Multifield module.
File
- ./
multifield.admin.inc, line 194 - Administation pages and forms for the Multifield module.
Code
function _multifield_get_usage_summary($machine_name, $links = FALSE) {
$fields = array();
foreach (multifield_type_get_fields($machine_name) as $field_name) {
$field = field_info_field($field_name);
foreach ($field['bundles'] as $entity_type => $bundles) {
foreach ($bundles as $bundle) {
$text = "{$field_name} ({$entity_type}:{$bundle})";
if ($links && module_exists('field_ui')) {
$path = _field_ui_bundle_admin_path($entity_type, $bundle) . '/fields/' . $field_name;
$fields[] = l($text, $path);
}
else {
$fields[] = check_plain($text);
}
}
}
}
return $fields;
}