You are here

function biblio_fields_info in Bibliography Module 7.3

Get the field info.

Parameters

string $field_name: The field name.

Return value

array An array with the field and instance definitions, or FALSE if not found.

4 calls to biblio_fields_info()
biblio_create_field in ./biblio.module
Create a biblio field in a bundle.
biblio_create_fields_by_bundle in ./biblio.module
Attach fields to bundles.
biblio_ui_create_fields in modules/biblio_ui/biblio_ui.module
Manage the fields of the biblio bundle.
biblio_ui_create_fields_submit in modules/biblio_ui/biblio_ui.module
Submit handler; Attaching the field on the bundle.

File

./biblio.module, line 822
Maintains bibliographic lists.

Code

function biblio_fields_info($field_name = NULL) {
  $return =& drupal_static(__FUNCTION__, array());
  if (empty($return)) {
    foreach (module_implements('biblio_fields_info') as $module) {
      if ($fields = module_invoke($module, 'biblio_fields_info')) {
        foreach ($fields as $key => $field) {

          // Add default values.
          $field += array(
            'entity type' => array(),
            'multiple' => FALSE,
            'description' => '',
          );

          // Add the module information.
          $return[$key] = array_merge($field, array(
            'module' => $module,
          ));
        }
      }
    }

    // Allow other modules to alter the field info.
    drupal_alter('biblio_fields_info', $return);
  }
  if (!empty($field_name)) {
    return !empty($return[$field_name]) ? $return[$field_name] : FALSE;
  }
  return $return;
}