Elgg
Version 1.11
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
views
default
input
form.php
Go to the documentation of this file.
1
<?php
18
$defaults
= array(
19
'method'
=>
'post'
,
20
'disable_security'
=> FALSE,
21
);
22
23
$vars
= array_merge(
$defaults
,
$vars
);
24
25
$vars
[
'class'
] = (array)
elgg_extract
(
'class'
,
$vars
, []);
26
$vars
[
'class'
][] =
'elgg-form'
;
27
28
$vars
[
'action'
] =
elgg_normalize_url
(
$vars
[
'action'
]);
29
$vars
[
'method'
] = strtolower(
$vars
[
'method'
]);
30
31
$body
=
$vars
[
'body'
];
32
unset(
$vars
[
'body'
]);
33
34
// Generate a security header
35
if
(!
$vars
[
'disable_security'
]) {
36
$body
=
elgg_view
(
'input/securitytoken'
) .
$body
;
37
}
38
unset(
$vars
[
'disable_security'
]);
39
unset(
$vars
[
'action_name'
]);
40
41
echo
elgg_format_element
(
'form'
,
$vars
,
"<fieldset>$body</fieldset>"
);
elgg_normalize_url
elgg_normalize_url($url)
Definition:
output.php:311
$defaults
$defaults
Definition:
form.php:18
elgg_extract
elgg_extract($key, array $array, $default=null, $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
Definition:
elgglib.php:1246
elgg_format_element
elgg_format_element($tag_name, array $attributes=array(), $text= '', array $options=array())
Format an HTML element.
Definition:
output.php:215
$body
$body
Definition:
form.php:31
echo
elgg echo
Translates a string.
Definition:
languages.js:43
elgg_view
elgg_view($view, $vars=array(), $bypass=false, $ignored=false, $viewtype= '')
Return a parsed view.
Definition:
views.php:354
$vars
$vars
Definition:
form.php:23
Generated on Sat Dec 21 2024 00:00:50 for Elgg by
1.8.11