Elgg  Version 1.11
create.php
Go to the documentation of this file.
1 <?php
6 $item = $vars['item'];
7 /* @var ElggRiverItem $item */
8 
9 $comment = $item->getObjectEntity();
10 $subject = $item->getSubjectEntity();
11 $target = $item->getTargetEntity();
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 $target_link = elgg_view('output/url', array(
21  'href' => $comment->getURL(),
22  'text' => $target->getDisplayName(),
23  'class' => 'elgg-river-target',
24  'is_trusted' => true,
25 ));
26 
27 $type = $target->getType();
28 $subtype = $target->getSubtype() ? $target->getSubtype() : 'default';
29 $key = "river:comment:$type:$subtype";
31 if ($summary == $key) {
32  $key = "river:comment:$type:default";
34 }
35 
36 echo elgg_view('river/elements/layout', array(
37  'item' => $vars['item'],
38  'message' => elgg_get_excerpt($comment->description),
39  'summary' => $summary,
40 ));
$subject_link
Definition: create.php:13
$item
Post comment river view.
Definition: create.php:6
$key
Definition: create.php:29
$target
Definition: create.php:11
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
$summary
Definition: create.php:30
$target_link
Definition: create.php:20
elgg echo
Translates a string.
Definition: languages.js:43
elgg_view($view, $vars=array(), $bypass=false, $ignored=false, $viewtype= '')
Return a parsed view.
Definition: views.php:354
$type
Definition: create.php:27
$subtype
Definition: create.php:28
elgg_get_excerpt($text, $num_chars=250)
Returns an excerpt.
Definition: output.php:72
$subject
Definition: create.php:10
$comment
Definition: create.php:9
if(file_exists($welcome)) $vars
Definition: upgrade.php:93