Elgg
Version 2.3
views
default
core
friends
collections.php
Go to the documentation of this file.
1
<?php
12
if
(is_array(
$vars
[
'collections'
]) &&
sizeof
(
$vars
[
'collections'
])) {
13
echo
"<ul id=\"friends_collections_accordian\">"
;
14
15
$friendspicker
= 0;
16
foreach
(
$vars
[
'collections'
] as
$collection
) {
17
$friendspicker
++;
18
echo
elgg_view
(
'core/friends/collection'
, array(
19
'collection'
=>
$collection
,
20
'friendspicker'
=>
$friendspicker
,
21
));
22
}
23
24
echo
"</ul>"
;
25
26
}
else
{
27
echo
elgg_echo
(
"friends:nocollections"
);
28
}
29
30
?>
31
<?php
//@todo JS 1.8: no ?>
32
<script>
33
require([
'jquery'
],
function
($) {
34
$(
function
() {
35
$(
'#friends_collections_accordian h2'
).on(
'click'
,
function
() {
36
$(this.parentNode).children(
"[class=friends-picker-main-wrapper]"
).slideToggle(
"fast"
);
37
});
38
});
39
});
40
</script>
$friendspicker
$friendspicker
Definition:
collectiontabs.php:12
elgg_echo
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition:
languages.php:21
elgg_view
elgg_view($view, $vars=array(), $ignore1=false, $ignore2=false, $viewtype='')
Return a parsed view.
Definition:
views.php:336
$collection
$collection
Definition:
pickercallback.php:15
$vars
$vars['entity']
Definition:
plugin_settings.php:15
Generated on Fri Aug 29 2025 00:00:46 for Elgg by
1.9.1