hook_entity_property_info_alter

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

Allow modules to alter metadata about entity properties.

See also

hook_entity_property_info()

Related topics

22 functions implement hook_entity_property_info_alter()

File

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

Code

<?php
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',
  );
}
?>