Elgg
Version 2.3
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
}
$key
$key
Definition:
summary.php:34
get_write_access_array
get_write_access_array($user_guid=0, $site_guid=0, $flush=false, array $input_params=array())
Returns an array of access permissions that the user is allowed to save content with.
Definition:
access.php:267
echo
elgg echo
Translates a string.
Definition:
languages.js:48
select
select
Definition:
admin.css.php:528
$vars
$vars['class']
Definition:
access.php:29
name
$site name
Definition:
update_basic.php:22
$class
$class
Elgg access level input Displays a dropdown input field.
Definition:
access.php:11
Generated on Mon Dec 30 2024 00:01:03 for Elgg by
1.8.11