Elgg  Version 1.9
button.php
Go to the documentation of this file.
1 <?php
10 if (isset($vars['class'])) {
11  $class = $vars['class'];
12 } else {
13  $class = "elgg-button-submit";
14 }
15 
16 if (isset($vars['name'])) {
17  $name = $vars['name'];
18 } else {
19  $name = '';
20 }
21 
22 if (isset($vars['type'])) {
23  $type = strtolower($vars['type']);
24 } else {
25  $type = 'submit';
26 }
27 
28 switch ($type) {
29  case 'button' :
30  $type='button';
31  break;
32  case 'submit':
33  default:
34  $type = 'submit';
35 }
36 
37 $value = htmlentities($vars['value'], ENT_QUOTES, 'UTF-8');
38 
39 ?>
40 <input type="<?php echo $type; ?>" value="<?php echo $value; ?>" class="<?php echo $class; ?>" />
if($guid==elgg_get_logged_in_user_guid()) $name
Definition: delete.php:21
$vars
Definition: button.php:22
if(isset($vars['id'])) $class
Definition: ajax_loader.php:19
$type
Definition: add.php:8
list style type
Definition: admin.php:724
elgg table input[type=checkbox]
Definition: admin.php:392
switch($type) $value
Definition: button.php:37