You are here

function eck__entity__uri in Entity Construction Kit (ECK) 7

Same name and namespace in other branches
  1. 7.3 eck.module \eck__entity__uri()
  2. 7.2 eck.module \eck__entity__uri()

Entity URI callback

Parameters

$entity: an object as returned by entity_load()

1 string reference to 'eck__entity__uri'
eck__entity_type__info in ./eck.entity_type.inc
Generate the entity info for a specific entity

File

./eck.module, line 465
ENTITY CONSTRUCTION KIT

Code

function eck__entity__uri($entity) {
  module_load_include('inc', 'eck', 'eck.entity');
  $crud_info = get_bundle_crud_info($entity
    ->entityType(), $entity->type);
  $view_path = str_replace('%', $entity
    ->identifier(), $crud_info['view']['path']);
  return array(
    'path' => $view_path,
  );
}