You are here

function eck_revision_revision_view in ECK Revision 7

entity_view helpper function for revisions.

1 string reference to 'eck_revision_revision_view'
eck_revision_menu in ./eck_revision.module
Implements hook_menu().

File

./eck_revision.module, line 510
ECK Revision module.

Code

function eck_revision_revision_view($entity_type, $revision_id) {

  // Load entity
  $revision = entity_revision_load($entity_type, array(
    $revision_id,
  ));
  if (empty($revision)) {
    drupal_not_found();
  }
  drupal_set_title(t('Revision %num of %title', array(
    '%title' => entity_label($entity_type, $revision),
    '%num' => $revision_id,
  )), PASS_THROUGH);
  return entity_view($entity_type, array(
    $revision,
  ));
}