Elgg
Version 1.9
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
views
default
river
elements
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"
;
35
$summary
=
elgg_echo
(
$key
, array(
$subject_link
,
$object_link
));
36
37
if
(
$summary
==
$key
) {
38
$key
=
"river:$action:$type:default"
;
39
$summary
=
elgg_echo
(
$key
, array(
$subject_link
,
$object_link
));
40
}
41
42
echo
$summary
;
$object
$object
Definition:
summary.php:11
$subtype
$subtype
Definition:
summary.php:30
$action
$action
Definition:
summary.php:28
elgg_echo
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition:
languages.php:21
$key
$key
Definition:
summary.php:34
$type
$type
Definition:
summary.php:29
$subject_link
$subject_link
Definition:
summary.php:13
echo
elgg echo
Translates a string.
Definition:
languages.js:43
$summary
$summary
Definition:
summary.php:35
elgg_view
elgg_view($view, $vars=array(), $bypass=false, $ignored=false, $viewtype= '')
Return a parsed view.
Definition:
views.php:354
$subject
$subject
Definition:
summary.php:10
elgg_get_excerpt
elgg_get_excerpt($text, $num_chars=250)
Returns an excerpt.
Definition:
output.php:72
$item
$item
Short summary of the action that occurred.
Definition:
summary.php:8
$object_text
$object_text
Definition:
summary.php:20
$vars
if(file_exists($welcome)) $vars
Definition:
upgrade.php:93
$object_link
$object_link
Definition:
summary.php:21
Generated on Sat Dec 21 2024 00:00:36 for Elgg by
1.8.11