function field_info_extra_fields

cis7 field.info.inc field_info_extra_fields($entity_type, $bundle, $context)
cle7 field.info.inc field_info_extra_fields($entity_type, $bundle, $context)
elmsmedia7 field.info.inc field_info_extra_fields($entity_type, $bundle, $context)
icor7 field.info.inc field_info_extra_fields($entity_type, $bundle, $context)
meedjum_blog7 field.info.inc field_info_extra_fields($entity_type, $bundle, $context)
mooc7 field.info.inc field_info_extra_fields($entity_type, $bundle, $context)

Returns a list and settings of pseudo-field elements in a given bundle.

If $context is 'form', an array with the following structure:

  array(
    'name_of_pseudo_field_component' => array(
      'label' => The human readable name of the component,
      'description' => A short description of the component content,
      'weight' => The weight of the component in edit forms,
    ),
    'name_of_other_pseudo_field_component' => array(
      // ...
    ),
  );

If $context is 'display', an array with the following structure:

  array(
    'name_of_pseudo_field_component' => array(
      'label' => The human readable name of the component,
      'description' => A short description of the component content,
      // One entry per view mode, including the 'default' mode:
      'display' => array(
        'default' => array(
          'weight' => The weight of the component in displayed entities in
            this view mode,
          'visible' => TRUE if the component is visible, FALSE if hidden, in
            displayed entities in this view mode,
        ),
        'teaser' => array(
          // ...
        ),
      ),
    ),
    'name_of_other_pseudo_field_component' => array(
      // ...
    ),
  );

Parameters

$entity_type: The type of entity; e.g. 'node' or 'user'.

$bundle: The bundle name.

$context: The context for which the list of pseudo-fields is requested. Either 'form' or 'display'.

Return value

The array of pseudo-field elements in the bundle.

Related topics

8 calls to field_info_extra_fields()
accessibility_test_render in sites/all/modules/ulmus/accessibility/accessibility.module
ctools_entity_field_extra_content_type_content_types in sites/all/modules/ulmus/ctools/plugins/content_types/entity_context/entity_field_extra.inc
Return all extra field content types available.
field_extra_fields_get_display in modules/field/field.module
Returns the display settings to use for pseudo-fields in a given view mode.
field_info_max_weight in modules/field/field.info.inc
Returns the maximum weight of all the components in an entity.
field_ui_display_overview_form in modules/field_ui/field_ui.admin.inc
Form constructor for the field display settings for a given view mode.

... See full list

File

modules/field/field.info.inc, line 684
Field Info API, providing information about available fields and field types.

Code

function field_info_extra_fields($entity_type, $bundle, $context) {
  $cache = _field_info_field_cache();
  $info = $cache->getBundleExtraFields($entity_type, $bundle);

  return isset($info[$context]) ? $info[$context] : array();
}