function entity_test_entity_setter in Entity API 7
Setter callback for the 'reference' property.
1 string reference to 'entity_test_entity_setter'
- entity_test_entity_property_info_alter in tests/
entity_test.module - Implements hook_entity_property_info_alter() for testing an property of type 'entity'.
File
- tests/
entity_test.module, line 280 - Test module for the entity API.
Code
function entity_test_entity_setter($node, $property_name, $wrapper) {
// The entity has to be passed wrapped.
$node->entity = array(
'type' => $wrapper
->type(),
'id' => $wrapper
->getIdentifier(),
);
}