Elgg
Version 1.11
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
views
default
river
object
comment
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"
;
30
$summary
=
elgg_echo
(
$key
, array(
$subject_link
,
$target_link
));
31
if
(
$summary
==
$key
) {
32
$key
=
"river:comment:$type:default"
;
33
$summary
=
elgg_echo
(
$key
, array(
$subject_link
,
$target_link
));
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
$subject_link
Definition:
create.php:13
$item
$item
Post comment river view.
Definition:
create.php:6
$key
$key
Definition:
create.php:29
$target
$target
Definition:
create.php:11
elgg_echo
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition:
languages.php:21
$summary
$summary
Definition:
create.php:30
$target_link
$target_link
Definition:
create.php:20
echo
elgg echo
Translates a string.
Definition:
languages.js:43
elgg_view
elgg_view($view, $vars=array(), $bypass=false, $ignored=false, $viewtype= '')
Return a parsed view.
Definition:
views.php:354
$type
$type
Definition:
create.php:27
$subtype
$subtype
Definition:
create.php:28
elgg_get_excerpt
elgg_get_excerpt($text, $num_chars=250)
Returns an excerpt.
Definition:
output.php:72
$subject
$subject
Definition:
create.php:10
$comment
$comment
Definition:
create.php:9
$vars
if(file_exists($welcome)) $vars
Definition:
upgrade.php:93
Generated on Sat Dec 21 2024 00:00:50 for Elgg by
1.8.11