You are here

function entity_hook_field_info in Entity API 7

Provide entity property information for fields.

This is a placeholder for describing further keys for hook_field_info(), which are introduced by the entity API.

For providing entity property info for fields each field type may specify a property type to map to using the key 'property_type'. With that info in place useful defaults are generated, which suffice for a lot of field types. However it is possible to specify further callbacks that may alter the generated property info. To do so use the key 'property_callbacks' and set it to an array of function names. Apart from that any property info provided for a field instance using the key 'property info' is added in too.

See also

entity_field_info_alter()

entity_metadata_field_text_property_callback()

File

./entity.api.php, line 433
Hooks provided by the entity API.

Code

function entity_hook_field_info() {
  return array(
    'text' => array(
      'label' => t('Text'),
      'property_type' => 'text',
    ),
  );
}