aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-05 19:36:32 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-05 19:36:32 +0000
commited81771d23473786d1fb43bae0ea5ca7f0b441ad (patch)
tree10b3de9f27b8d4ce58f5da27a231b71b9fba26e8 /engine
parent0a6e0702c71bb3aa50f0daae21c456c51a362b27 (diff)
downloadelgg-ed81771d23473786d1fb43bae0ea5ca7f0b441ad.tar.gz
elgg-ed81771d23473786d1fb43bae0ea5ca7f0b441ad.tar.bz2
added a convience function for the media content pattern - is elgg_view_media() a good name?
git-svn-id: http://code.elgg.org/elgg/trunk@7538 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/views.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/engine/lib/views.php b/engine/lib/views.php
index e4592d4b7..70b4b833d 100644
--- a/engine/lib/views.php
+++ b/engine/lib/views.php
@@ -971,14 +971,37 @@ function elgg_view_comments($entity, $add_comment = true) {
}
/**
+ * Wrapper function for the media display pattern.
+ *
+ * Fixed width media on the side (image, icon, flash, etc.).
+ * Descriptive content filling the rest of the column.
+ *
+ * This is a shortcut for {@elgg_view layout_elements/media}.
+ *
+ * @param string $icon The icon and other information
+ * @param string $body Description content
+ * @param string $vars Additional parameters for the view
+ *
+ * @return string
+ * @since 1.8.0
+ */
+function elgg_view_media($icon, $body, $vars = array()) {
+ $vars['icon'] = $icon;
+ $vars['body'] = $body;
+ return elgg_view('layout_elements/media', $vars);
+}
+
+/**
* Wrapper function to display search listings.
*
* @param string $icon The icon for the listing
* @param string $info Any information that needs to be displayed.
*
* @return string The HTML (etc) representing the listing
+ * @deprecated 1.8 use elgg_view_media()
*/
function elgg_view_listing($icon, $info) {
+ elgg_deprecated_notice('elgg_view_listing deprecated by elgg_view_media', 1.8);
return elgg_view('entities/entity_listing', array('icon' => $icon, 'info' => $info));
}