Elgg
Version 1.9
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
views
installation
input
access.php
Go to the documentation of this file.
1
<?php
11
$class
=
"elgg-input-access"
;
12
13
if
((!isset(
$vars
[
'options'
])) || (!is_array(
$vars
[
'options'
]))) {
14
$vars
[
'options'
] = array();
15
$vars
[
'options'
] =
get_write_access_array
();
16
}
17
18
if
(is_array(
$vars
[
'options'
]) &&
sizeof
(
$vars
[
'options'
]) > 0) {
19
20
?>
21
22
<select name=
"<?php echo $vars['name']; ?>"
class
=
"<?php echo $class; ?>"
>
23
<?php
24
25
foreach
(
$vars
[
'options'
] as
$key
=> $option) {
26
if
(
$key
!=
$vars
[
'value'
]) {
27
echo
"<option value=\"{$key}\">{$option}</option>"
;
28
}
else
{
29
echo
"<option value=\"{$key}\" selected=\"selected\">{$option}</option>"
;
30
}
31
}
32
33
?>
34
</select>
35
36
<?php
37
38
}
$vars
if($entity) $vars
Definition:
access.php:44
$key
$key
Definition:
summary.php:34
echo
elgg echo
Translates a string.
Definition:
languages.js:43
$class
$class
Elgg access level input Displays a dropdown input field.
Definition:
access.php:11
get_write_access_array
get_write_access_array($user_guid=0, $site_guid=0, $flush=false)
Returns an array of access permissions that the user is allowed to save content with.
Definition:
access.php:484
Generated on Sat Sep 7 2024 00:00:33 for Elgg by
1.8.11