Elgg  Version 2.2
 All Classes Namespaces Files Functions Variables Pages
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; ?>" />
$vars['class']
Definition: button.php:12
if($guid==elgg_get_logged_in_user_guid()) $name
Definition: delete.php:21
if(isset($vars['id'])) $class
Definition: ajax_loader.php:19
elgg river item input[type=text]
switch($type) $value
Definition: button.php:37
if(!$display_name) $type
Definition: delete.php:27