Elgg  Version 2.2
 All Classes Namespaces Files Functions Variables Pages
plaintext.php
Go to the documentation of this file.
1 <?php
15 $vars['class'] = (array) elgg_extract('class', $vars, []);
16 $vars['class'][] = 'elgg-input-plaintext';
17 
18 $defaults = array(
19  'value' => '',
20  'rows' => '10',
21  'cols' => '50',
22  'disabled' => false,
23 );
24 
25 $vars = array_merge($defaults, $vars);
26 
27 $value = htmlspecialchars($vars['value'], ENT_QUOTES, 'UTF-8');
28 unset($vars['value']);
29 
30 echo elgg_format_element('textarea', $vars, $value);
$value
Definition: plaintext.php:27
elgg_format_element($tag_name, array $attributes=array(), $text= '', array $options=array())
Format an HTML element.
Definition: output.php:218
$vars['class']
Definition: plaintext.php:15
$defaults
Definition: plaintext.php:18
elgg_extract($key, $array, $default=null, $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
Definition: elgglib.php:1310