You are here

function entity_property_text_formatted_info in Entity API 7

Defines info for the properties of the text_formatted data structure.

4 calls to entity_property_text_formatted_info()
entity_metadata_comment_entity_property_info_alter in modules/comment.info.inc
Implements hook_entity_property_info_alter() on top of comment module.
entity_metadata_field_text_property_callback in modules/field.info.inc
Additional callback to adapt the property info for text fields. If a text field is processed we make use of a separate data structure so that format filters are available too. For the text value that is sanitized, this processed value is returned by…
entity_metadata_node_entity_property_info_alter in modules/node.info.inc
Implements hook_entity_property_info_alter() on top of node module.
entity_metadata_text_formatted_properties in includes/entity.property.inc
Deprecated. Do not make use of this function, instead use the new one.

File

includes/entity.property.inc, line 498
Provides API functions around hook_entity_property_info(). Also see entity.info.inc, which cares for providing entity property info for all core entity types.

Code

function entity_property_text_formatted_info() {
  return array(
    'value' => array(
      'type' => 'text',
      'label' => t('Text'),
      'sanitized' => TRUE,
      'getter callback' => 'entity_metadata_field_text_get',
      'setter callback' => 'entity_property_verbatim_set',
      'setter permission' => 'administer nodes',
      'raw getter callback' => 'entity_property_verbatim_get',
    ),
    'summary' => array(
      'type' => 'text',
      'label' => t('Summary'),
      'sanitized' => TRUE,
      'getter callback' => 'entity_metadata_field_text_get',
      'setter callback' => 'entity_property_verbatim_set',
      'setter permission' => 'administer nodes',
      'raw getter callback' => 'entity_property_verbatim_get',
    ),
    'format' => array(
      'type' => 'token',
      'label' => t('Text format'),
      'options list' => 'entity_metadata_field_text_formats',
      'getter callback' => 'entity_property_verbatim_get',
      'setter callback' => 'entity_property_verbatim_set',
      'setter permissions' => 'administer filters',
    ),
  );
}