You are here

function hook_entity_property_info_alter in Entity API 7

Allow modules to alter metadata about entity properties.

See also

hook_entity_property_info()

9 functions implement hook_entity_property_info_alter()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

entity_entity_property_info_alter in ./entity.info.inc
Implements hook_entity_property_info_alter().
entity_metadata_book_entity_property_info_alter in modules/book.info.inc
Implements hook_entity_property_info_alter() on top of book module.
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_locale_entity_property_info_alter in modules/locale.info.inc
Implements hook_entity_property_info_alter() on top of locale module.
entity_metadata_node_entity_property_info_alter in modules/node.info.inc
Implements hook_entity_property_info_alter() on top of node module.

... See full list

File

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

Code

function hook_entity_property_info_alter(&$info) {
  $properties =& $info['node']['bundles']['poll']['properties'];
  $properties['poll-votes'] = array(
    'label' => t("Poll votes"),
    'description' => t("The number of votes that have been cast on a poll node."),
    'type' => 'integer',
    'getter callback' => 'entity_property_poll_node_get_properties',
  );
}