function field_info_field_types
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 calls to field_info_field_types()
- FieldCrudTestCase::testCreateField in modules/
field/ tests/ field.test - Test the creation of a field.
- FieldInfo::prepareInstanceDisplay in modules/
field/ field.info.class.inc - Adapts display specifications to the current run-time context.
- FieldInfo::prepareInstanceWidget in modules/
field/ field.info.class.inc - Prepares widget properties for the current run-time context.
- 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.
File
-
modules/
field/ field.info.inc, line 333
Code
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;
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.