Elgg  Version 1.9
create.php
Go to the documentation of this file.
1 <?php
6 $item = $vars['item'];
7 
8 $comment = $item->getObjectEntity();
9 $subject = $item->getSubjectEntity();
10 $target = $item->getTargetEntity();
11 
12 $subject_link = elgg_view('output/url', array(
13  'href' => $subject->getURL(),
14  'text' => $subject->name,
15  'class' => 'elgg-river-subject',
16  'is_trusted' => true,
17 ));
18 
19 $target_link = elgg_view('output/url', array(
20  'href' => $target->getURL(),
21  'text' => $target->getDisplayName(),
22  'class' => 'elgg-river-target',
23  'is_trusted' => true,
24 ));
25 
26 $type = $target->getType();
27 $subtype = $target->getSubtype() ? $target->getSubtype() : 'default';
28 $key = "river:comment:$type:$subtype";
30 if ($summary == $key) {
31  $key = "river:comment:$type:default";
33 }
34 
35 echo elgg_view('river/elements/layout', array(
36  'item' => $vars['item'],
37  'message' => elgg_get_excerpt($comment->description),
38  'summary' => $summary,
39 ));
$subject_link
Definition: create.php:12
$item
Post comment river view.
Definition: create.php:6
$key
Definition: create.php:28
$target
Definition: create.php:10
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:29
$target_link
Definition: create.php:19
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:26
$subtype
Definition: create.php:27
elgg_get_excerpt($text, $num_chars=250)
Returns an excerpt.
Definition: output.php:72
$subject
Definition: create.php:9
$comment
Definition: create.php:8
if(file_exists($welcome)) $vars
Definition: upgrade.php:93