diff options
author | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-03-28 15:56:15 +0000 |
---|---|---|
committer | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-03-28 15:56:15 +0000 |
commit | 3e69ba121f82526a7ff50a19287bf0a3fdecbcd4 (patch) | |
tree | d1ee984973d116dce659d0e4b67c4d8d55b240e1 | |
parent | 1705abb86f976f3e0e0bd979e03d6f7048cb70c3 (diff) | |
download | elgg-3e69ba121f82526a7ff50a19287bf0a3fdecbcd4.tar.gz elgg-3e69ba121f82526a7ff50a19287bf0a3fdecbcd4.tar.bz2 |
Some extra params for elgg_view_entity
git-svn-id: https://code.elgg.org/elgg/trunk@281 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r-- | engine/lib/elgglib.php | 9 |
1 files changed, 6 insertions, 3 deletions
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);
}
|