Elgg  Version 6.0
plaintext.php
Go to the documentation of this file.
1 <?php
11 $vars['class'] = elgg_extract_class($vars, 'elgg-input-plaintext');
12 
14  'rows' => '10',
15  'cols' => '50',
16 ];
17 
18 $vars = array_merge($defaults, $vars);
19 
20 $value = htmlspecialchars(elgg_extract('value', $vars, ''), ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8');
21 unset($vars['value']);
22 
23 echo elgg_format_element('textarea', $vars, $value);
elgg_extract($key, $array, $default=null, bool $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
Definition: elgglib.php:254
$vars['class']
Elgg long text input (plaintext) Displays a long text input field that should not be overridden by wy...
Definition: plaintext.php:11
$defaults
Definition: plaintext.php:13
elgg_format_element(string $tag_name, array $attributes=[], string $text= '', array $options=[])
Format an HTML element.
Definition: output.php:145
elgg_extract_class(array $array, array|string $existing=[], string $extract_key= 'class')
Extract class names from an array, optionally merging into a preexisting set.
Definition: elgglib.php:277
$value
Definition: plaintext.php:20