From 3e69ba121f82526a7ff50a19287bf0a3fdecbcd4 Mon Sep 17 00:00:00 2001 From: ben Date: Fri, 28 Mar 2008 15:56:15 +0000 Subject: Some extra params for elgg_view_entity git-svn-id: https://code.elgg.org/elgg/trunk@281 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/elgglib.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'engine/lib/elgglib.php') diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php index 74585a6d9..2691eb9bd 100644 --- a/engine/lib/elgglib.php +++ b/engine/lib/elgglib.php @@ -161,13 +161,16 @@ * to receive. * * @param ElggEntity $entity The entity to display + * @param string $viewtype Optionally, the type of view that we're using (most commonly 'default') + * @param boolean $debug If set to true, elgg_view will bypass any specified alternative template handler; by default, it will hand off to this if requested (see set_template_handler) + * @param boolean $debug If set to true, the viewer will complain if it can't find a view * @return string HTML (etc) to display */ - function elgg_view_entity(ElggEntity $entity) { + function elgg_view_entity(ElggEntity $entity, $viewtype = "", $bypass = true, $debug = false) { $view = $entity->view; if (is_string($view)) { - return elgg_view($view,array('entity' => $entity)); + return elgg_view($view,array('entity' => $entity), $viewtype, $bypass, $debug); } $classes = array( @@ -192,7 +195,7 @@ $subtype = $entity->getSubtype(); - return elgg_view("{$entity_type}/{$subtype}",array('entity' => $entity)); + return elgg_view("{$entity_type}/{$subtype}",array('entity' => $entity), $viewtype, $bypass, $debug); } -- cgit v1.2.3