function relation_entity_property_info in Relation 7
Implements hook_entity_property_info().
File
- ./
relation.module, line 55 - Describes relations between entities.
Code
function relation_entity_property_info() {
$info = array();
$properties =& $info['relation']['properties'];
$properties = array(
'rid' => array(
'label' => t('Relation ID'),
'description' => t('The internal numeric ID of the relation.'),
'type' => 'integer',
'schema field' => 'rid',
),
'relation_type' => array(
'label' => t('Relation type'),
'type' => 'token',
'description' => t('The type of the relation.'),
'setter callback' => 'entity_property_verbatim_set',
'setter permission' => 'edit relations',
'options list' => 'relation_rules_get_type_options',
'required' => TRUE,
'schema field' => 'relation_type',
),
'endpoints' => array(
'label' => t('Endpoints'),
'type' => 'list<entity>',
'description' => t('The endpoints of the relation.'),
'setter callback' => 'relation_rules_set_endpoints',
'getter callback' => 'relation_rules_get_endpoints',
'setter permission' => 'edit relations',
'required' => TRUE,
),
);
return $info;
}