You are here

function entity_metadata_entity_get_properties in Entity API 7

Callback for getting properties of an entity.

4 string references to 'entity_metadata_entity_get_properties'
EntityDefaultMetadataController::entityPropertyInfo in ./entity.info.inc
entity_metadata_comment_entity_property_info in modules/comment.info.inc
Implements hook_entity_property_info() on top of comment module.
entity_metadata_node_entity_property_info in modules/node.info.inc
Implements hook_entity_property_info() on top of node module.
entity_metadata_taxonomy_entity_property_info in modules/taxonomy.info.inc
Implements hook_entity_property_info() on top of taxonomy module.

File

modules/callbacks.inc, line 11
Provides various callbacks for the whole core module integration.

Code

function entity_metadata_entity_get_properties($entity, array $options, $name, $entity_type) {
  if ($name == 'url') {
    $return = entity_uri($entity_type, $entity);
    return url($return['path'], $return['options'] + $options);
  }
}