summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaroly Negyesi2012-01-11 17:03:56 (GMT)
committer Karoly Negyesi2012-01-11 17:03:56 (GMT)
commite1a955f5d2ec5b62f8eacf113d4417f853024296 (patch)
treea863744267e7bb8853f91e3857b2c57025eff623
parenta654ce805ba31545098bdbcb37aed5be07e98fec (diff)
Add some default entity build properties.
-rw-r--r--relation.module5
1 files changed, 5 insertions, 0 deletions
diff --git a/relation.module b/relation.module
index 65a9f07..ec79362 100644
--- a/relation.module
+++ b/relation.module
@@ -574,6 +574,11 @@ function relation_view($relation, $view_mode = 'full') {
field_attach_prepare_view($entity_type, $entities, $view_mode);
entity_prepare_view($entity_type, $entities);
$build = field_attach_view($entity_type, $entity, $view_mode);
+ $build += array(
+ '#entity' => $relation,
+ '#view_mode' => $view_mode,
+ '#language' => LANGUAGE_NONE,
+ );
module_invoke_all('entity_view', $entity, $entity_type, $view_mode, LANGUAGE_NONE);
drupal_alter('entity_view', $build, $entity_type);
return $build;