function field_info_formatter_types

Returns information about field formatters from hook_field_formatter_info().

Parameters

$formatter_type: (optional) A formatter type name. If omitted, all formatter types will be returned.

Return value

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

Related topics

10 calls to field_info_formatter_types()
FieldInfo::prepareInstanceDisplay in modules/field/field.info.class.inc
Adapts display specifications to the current run-time context.
FieldInfoTestCase::testFieldInfo in modules/field/tests/field.test
Test that field types and field definitions are correcly cached.
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.

... See full list

File

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

Code

function field_info_formatter_types($formatter_type = NULL) {
    $info = _field_info_collate_types();
    $formatter_types = $info['formatter types'];
    if ($formatter_type) {
        if (isset($formatter_types[$formatter_type])) {
            return $formatter_types[$formatter_type];
        }
    }
    else {
        return $formatter_types;
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.