Elgg
Version 1.9
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
views
default
input
tags.php
Go to the documentation of this file.
1
<?php
12
if
(isset(
$vars
[
'class'
])) {
13
$vars
[
'class'
] =
"elgg-input-tags {$vars['class']}"
;
14
}
else
{
15
$vars
[
'class'
] =
"elgg-input-tags"
;
16
}
17
18
$defaults
= array(
19
'value'
=>
''
,
20
'disabled'
=>
false
,
21
'autocapitalize'
=>
'off'
,
22
);
23
24
if
(isset(
$vars
[
'entity'
])) {
25
$defaults
[
'value'
] =
$vars
[
'entity'
]->tags;
26
unset(
$vars
[
'entity'
]);
27
}
28
29
$vars
= array_merge(
$defaults
,
$vars
);
30
31
if
(is_array(
$vars
[
'value'
])) {
32
$tags
= array();
33
34
foreach
(
$vars
[
'value'
] as $tag) {
35
if
(is_string($tag)) {
36
$tags
[] = $tag;
37
}
else
{
38
$tags
[] = $tag->value;
39
}
40
}
41
42
$vars
[
'value'
] = implode(
", "
,
$tags
);
43
}
44
45
?>
46
<
input
type
=
"text"
<?php
echo
elgg_format_attributes
(
$vars
); ?> />
$tags
$tags
Definition:
summary.php:41
$vars
if(isset($vars['entity'])) $vars
Definition:
tags.php:29
echo
elgg echo
Translates a string.
Definition:
languages.js:43
elgg_format_attributes
elgg_format_attributes(array $attrs=array())
Converts an associative array into a string of well-formed attributes.
Definition:
output.php:118
$defaults
$defaults
Definition:
tags.php:18
type
list style type
Definition:
admin.php:724
input
elgg table input[type=checkbox]
Definition:
admin.php:392
Generated on Tue Jan 14 2025 00:00:35 for Elgg by
1.8.11