function hook_entity_property_info_alter

7.x entity.api.php hook_entity_property_info_alter(&$info)

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

... See full list

File

entity/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',
  );
}