Elgg  Version 2.2
 All Classes Namespaces Files Functions Variables Pages
summary.php
Go to the documentation of this file.
1 <?php
20 $entity = $vars['entity'];
21 
22 $title_link = elgg_extract('title', $vars, '');
23 if ($title_link === '') {
24  if (isset($entity->title)) {
25  $text = $entity->title;
26  } else {
27  $text = $entity->name;
28  }
29  $params = array(
30  'text' => elgg_get_excerpt($text, 100),
31  'href' => $entity->getURL(),
32  'is_trusted' => true,
33  );
34  $title_link = elgg_view('output/url', $params);
35 }
36 
37 $metadata = elgg_extract('metadata', $vars, '');
38 $subtitle = elgg_extract('subtitle', $vars, '');
39 $content = elgg_extract('content', $vars, '');
40 
41 $tags = elgg_extract('tags', $vars, '');
42 if ($tags === '') {
43  $tags = elgg_view('output/tags', array('tags' => $entity->tags));
44 }
45 
46 if ($metadata) {
47  echo $metadata;
48 }
50  echo "<h3>$title_link</h3>";
51 }
52 echo "<div class=\"elgg-subtext\">$subtitle</div>";
53 echo $tags;
54 
55 echo elgg_view('object/summary/extend', $vars);
56 
57 if ($content) {
58  echo "<div class=\"elgg-content\">$content</div>";
59 }
$tags
Definition: summary.php:41
$title_link
Definition: summary.php:22
$vars['entity']
$params
Definition: login.php:72
$text
Definition: default.php:25
if($title_link=== '') $metadata
Definition: summary.php:37
elgg_view($view, $vars=array(), $ignore1=false, $ignore2=false, $viewtype= '')
Return a parsed view.
Definition: views.php:342
$content
Definition: summary.php:39
elgg_extract($key, $array, $default=null, $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
Definition: elgglib.php:1310
$subtitle
Definition: summary.php:38
elgg_get_excerpt($text, $num_chars=250)
Returns an excerpt.
Definition: output.php:72
$entity
Object summary.
Definition: summary.php:20