Elgg  Version 1.11
summary.php
Go to the documentation of this file.
1 <?php
8 $item = $vars['item'];
9 
10 $subject = $item->getSubjectEntity();
11 $object = $item->getObjectEntity();
12 
13 $subject_link = elgg_view('output/url', array(
14  'href' => $subject->getURL(),
15  'text' => $subject->name,
16  'class' => 'elgg-river-subject',
17  'is_trusted' => true,
18 ));
19 
20 $object_text = $object->title ? $object->title : $object->name;
21 $object_link = elgg_view('output/url', array(
22  'href' => $object->getURL(),
23  'text' => elgg_get_excerpt($object_text, 100),
24  'class' => 'elgg-river-object',
25  'is_trusted' => true,
26 ));
27 
28 $action = $item->action_type;
29 $type = $item->type;
30 $subtype = $item->subtype ? $item->subtype : 'default';
31 
32 // check summary translation keys.
33 // will use the $type:$subtype if that's defined, otherwise just uses $type:default
34 $key = "river:$action:$type:$subtype";
36 
37 if ($summary == $key) {
38  $key = "river:$action:$type:default";
40 }
41 
$object
Definition: summary.php:11
$subtype
Definition: summary.php:30
$action
Definition: summary.php:28
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
$key
Definition: summary.php:34
$type
Definition: summary.php:29
$subject_link
Definition: summary.php:13
elgg echo
Translates a string.
Definition: languages.js:43
$summary
Definition: summary.php:35
elgg_view($view, $vars=array(), $bypass=false, $ignored=false, $viewtype= '')
Return a parsed view.
Definition: views.php:354
$subject
Definition: summary.php:10
elgg_get_excerpt($text, $num_chars=250)
Returns an excerpt.
Definition: output.php:72
$item
Short summary of the action that occurred.
Definition: summary.php:8
$object_text
Definition: summary.php:20
if(file_exists($welcome)) $vars
Definition: upgrade.php:93
$object_link
Definition: summary.php:21