function eck__entity_type__property_info in Entity Construction Kit (ECK) 7
Entity Type specific implementation of property info alter.
1 call to eck__entity_type__property_info()
- eck_entity_property_info_alter in ./
eck.module - Implements hook_entity_property_info_alter().
File
- ./
eck.entity_type.inc, line 632 - ENTITY TYPE
Code
function eck__entity_type__property_info(&$info, $entity_type_object) {
$properties =& $info['properties'];
//@TODO Shouldn't we be checking on the properies array of our entity_type_object.. maybe entity api
//is correctly doing this automatically (CHECK)
if (isset($properties['uid'])) {
$properties['uid']['label'] = t('User');
$properties['uid']['type'] = 'user';
$properties['uid']['description'] = t('The author of this entity.');
}
if (isset($properties['created'])) {
$properties['created']['label'] = t('Created');
$properties['created']['type'] = 'date';
$properties['created']['description'] = t('The Unix timestamp when the entity has been created.');
}
if (isset($properties['changed'])) {
$properties['changed']['label'] = t('Changed');
$properties['changed']['type'] = 'date';
$properties['changed']['description'] = t('The Unix timestamp when the entity was most recently saved.');
}
// Add custom properties.
foreach ($entity_type_object->custom_properties as $name => $property) {
$properties[$name]['label'] = t($property['label']);
$properties[$name]['type'] = $property['type'];
//$properties[$name]['description'] = '';
}
}