Elgg  Version 2.2
 All Classes Namespaces Files Functions Variables Pages
default.php
Go to the documentation of this file.
1 <?php
10 $annotation = $vars['annotation'];
11 
12 $owner = get_entity($annotation->owner_guid);
13 if (!$owner) {
14  return true;
15 }
17 $owner_link = "<a href=\"{$owner->getURL()}\">$owner->name</a>";
18 
19 $menu = elgg_view_menu('annotation', array(
20  'annotation' => $annotation,
21  'sort_by' => 'priority',
22  'class' => 'elgg-menu-hz float-alt',
23 ));
24 
25 $text = elgg_view("output/longtext", array("value" => $annotation->value));
26 
28 
29 $body = <<<HTML
30 <div class="mbn">
31  $menu
33  <span class="elgg-subtext">
35  </span>
36  $text
37 </div>
38 HTML;
39 
$annotation
Elgg default annotation view.
Definition: default.php:10
$friendlytime
Definition: default.php:27
$owner_link
Definition: default.php:17
if(!$owner) $icon
Definition: default.php:16
$text
Definition: default.php:25
elgg_view_image_block($image, $body, $vars=array())
Wrapper function for the image block display pattern.
Definition: views.php:1186
elgg_view($view, $vars=array(), $ignore1=false, $ignore2=false, $viewtype= '')
Return a parsed view.
Definition: views.php:342
if(!array_key_exists($size, $icon_sizes)) $vars['size']
Definition: default.php:24
elgg_view_menu($menu, array $vars=array())
Render a menu.
Definition: views.php:745
elgg_view_entity_icon(\ElggEntity $entity, $size= 'medium', $vars=array())
View the icon of an entity.
Definition: views.php:895
$menu
Definition: default.php:19
$owner
Definition: default.php:12
$body
Definition: default.php:29
elgg_view_friendly_time($time)
Displays a UNIX timestamp in a friendly way.
Definition: views.php:1133
get_entity($guid)
Loads and returns an entity object from a guid.
Definition: entities.php:204