field_info_field_types

  1. drupal
    1. 8
    2. 7
Versions
7 – 8 field_info_field_types($field_type = NULL)

Returns information about field types from hook_field_info().

Parameters

$field_type (optional) A field type name. If omitted, all field types will be returned.

Return value

Either a field type description, as provided by hook_field_info(), or an array of all existing field types, keyed by field type name.

Related topics

▾ 22 functions call field_info_field_types()

FieldCrudTestCase::testCreateField in modules/field/tests/field.test
Test the creation of a field.
FieldInfoTestCase::testFieldInfo in modules/field/tests/field.test
Test that field types and field definitions are correcly cached.
FieldInfoTestCase::testFieldPrepare in modules/field/tests/field.test
Test that cached field definitions are ready for current runtime context.
FieldInfoTestCase::testInstancePrepare in modules/field/tests/field.test
Test that cached instance definitions are ready for current runtime context.
FieldInstanceCrudTestCase::testCreateFieldInstance in modules/field/tests/field.test
Test the creation of a field instance.
FieldInstanceCrudTestCase::testUpdateFieldInstance in modules/field/tests/field.test
Test the update of a field instance.
field_create_field in modules/field/field.crud.inc
Creates a field.
field_info_field_settings in modules/field/field.info.inc
Returns a field type's default settings.
field_info_instance_settings in modules/field/field.info.inc
Returns a field type's default instance settings.
field_ui_display_overview_form in modules/field_ui/field_ui.admin.inc
Menu callback; presents field display settings for a given view mode.
field_ui_existing_field_options in modules/field_ui/field_ui.admin.inc
Return an array of existing field to be added to a bundle.
field_ui_fields_list in modules/field_ui/field_ui.admin.inc
Menu callback; lists all defined fields for quick reference.
field_ui_field_edit_form in modules/field_ui/field_ui.admin.inc
Menu callback; presents the field instance edit page.
field_ui_field_overview_form in modules/field_ui/field_ui.admin.inc
Menu callback; listing of fields for a bundle.
field_ui_field_type_options in modules/field_ui/field_ui.admin.inc
Return an array of field_type options.
field_ui_formatter_options in modules/field_ui/field_ui.admin.inc
Return an array of formatter options for a field type.
field_ui_inactive_message in modules/field_ui/field_ui.admin.inc
Helper function to display a message about inactive fields.
field_ui_widget_type_form in modules/field_ui/field_ui.admin.inc
Menu callback; select a widget for the field.
field_ui_widget_type_options in modules/field_ui/field_ui.admin.inc
Return an array of widget type options for a field type.
_field_info_prepare_instance_display in modules/field/field.info.inc
Adapts display specifications to the current run-time context.
_field_info_prepare_instance_widget in modules/field/field.info.inc
Prepares widget specifications for the current run-time context.
_field_write_instance in modules/field/field.crud.inc
Stores an instance record in the field configuration database.

Code

modules/field/field.info.inc, line 479

<?php
function field_info_field_types($field_type = NULL) {
  $info = _field_info_collate_types();
  $field_types = $info['field types'];
  if ($field_type) {
    if (isset($field_types[$field_type])) {
      return $field_types[$field_type];
    }
  }
  else {
    return $field_types;
  }
}
?>