blob: bcb1b04fda3d34dd0a3c78d77fe2442d18677b5d (
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
<?php
/**
* ElggObject default view.
*
* @warning This view may be used for other ElggEntity objects
*
* @package Elgg
* @subpackage Core
*/
$icon = elgg_view_entity_icon($vars['entity'], 'small');
$title = $vars['entity']->title;
if (!$title) {
$title = $vars['entity']->name;
}
if (!$title) {
$title = get_class($vars['entity']);
}
if (elgg_instanceof($vars['entity'], 'object')) {
$metadata = elgg_view('layout/objects/list/metadata', $vars);
}
$owner_link = '';
$owner = $vars['entity']->getOwnerEntity();
if ($owner) {
$owner_link = elgg_view('output/url', array(
'href' => $owner->getURL(),
'text' => $owner->name,
));
}
$date = elgg_view_friendly_time($vars['entity']->time_created);
$subtitle = "$owner_link $date";
$params = array(
'entity' => $vars['entity'],
'title' => $title,
'metadata' => $metadata,
'subtitle' => $subtitle,
'tags' => $vars['entity']->tags,
);
$body = elgg_view('layout/objects/list/body', $params);
echo elgg_view_image_block($icon, $body);
|