You are here

function entity_test_entity_property_info_alter in Entity API 7

Implements hook_entity_property_info_alter() for testing an property of type 'entity'.

File

tests/entity_test.module, line 249
Test module for the entity API.

Code

function entity_test_entity_property_info_alter(&$info) {
  $info['node']['properties']['reference'] = array(
    'label' => t('Test reference'),
    'description' => t('A generic entity reference.'),
    'getter callback' => 'entity_test_entity_getter',
    'setter callback' => 'entity_test_entity_setter',
    'type' => 'entity',
  );
}