Elgg  Version 2.2
 All Classes Namespaces Files Functions Variables Pages
template.php
Go to the documentation of this file.
1 <?php
9 $variables = $vars['variables'];
10 $type = $vars['type'];
11 
12 foreach ($variables as $name => $params) {
13  $label = elgg_echo("install:$type:label:$name");
14  $help = elgg_echo("install:$type:help:$name");
15  $params['name'] = $name;
16 
17  $input = elgg_view("input/{$params['type']}", $params);
18 
19  $field = <<<FIELD
20 <label class="elgg-form-field">
21  <span class="elgg-form-field-label">$label</span>
22  <span class="elgg-form-field-help">$help</span>
23  $input
24 </label>
25 FIELD;
26 
27  $form_body .= $field;
28 }
29 
30 $form_body .= elgg_view('input/submit', array(
31  'value' => elgg_echo('install:next'),
32 ));
33 
34 echo $form_body;
if($guid==elgg_get_logged_in_user_guid()) $name
Definition: delete.php:21
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
if(!$owner||!($owner instanceof ElggUser)||!$owner->canEdit()) $input
Definition: edit.php:19
$vars['entity']
$params
Definition: login.php:72
foreach($variables as $name=> $params) $form_body
Definition: template.php:30
if(elgg_extract('required', $vars)) $field
Definition: field.php:26
elgg_view($view, $vars=array(), $ignore1=false, $ignore2=false, $viewtype= '')
Return a parsed view.
Definition: views.php:342
$help
Definition: field.php:18
$variables
Generic form template for install forms.
Definition: template.php:9
$label
Elgg profile plugin edit default profile action.
Definition: add.php:7
$type
Definition: template.php:10