aboutsummaryrefslogtreecommitdiff
path: root/mod/videolist/views/default/widgets/videolist/content.php
blob: aaf6076a3471f0a0d6296cc73d075756ddd1beac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
/**
 * Elgg video list widget
 *
 * @package ElggVideolist
 */

$num = (int) $vars['entity']->videos_num;

$options = array(
	'type' => 'object',
	'subtype' => 'videolist_item',
	'container_guid' => $vars['entity']->owner_guid,
	'limit' => $num,
	'full_view' => FALSE,
	'pagination' => FALSE,
);
$content = elgg_list_entities($options);

echo $content;

if ($content) {
	$url = "pages/owner/" . elgg_get_page_owner_entity()->username;
	$more_link = elgg_view('output/url', array(
		'href' => $url,
		'text' => elgg_echo('videolist:more'),
		'is_trusted' => true,
	));
	echo "<span class=\"elgg-widget-more\">$more_link</span>";
} else {
	echo elgg_echo('videolist:none');
}