Elgg  Version 2.2
 All Classes Namespaces Files Functions Variables Pages
longtext.php
Go to the documentation of this file.
1 <?php
14 $vars['class'] = (array) elgg_extract('class', $vars, []);
15 $vars['class'][] = 'elgg-input-longtext';
16 
17 $defaults = array(
18  'value' => '',
19  'rows' => '10',
20  'cols' => '50',
21  'id' => "elgg-input-" . base_convert(mt_rand(), 10, 36),
22 );
23 
24 $vars = array_merge($defaults, $vars);
25 
26 $value = htmlspecialchars($vars['value'], ENT_QUOTES, 'UTF-8');
27 unset($vars['value']);
28 
29 echo elgg_view_menu('longtext', array(
30  'sort_by' => 'priority',
31  'class' => 'elgg-menu-hz',
32  'id' => $vars['id'],
33 ));
34 
35 echo elgg_format_element('textarea', $vars, $value);
$vars['class']
Definition: longtext.php:14
$value
Definition: longtext.php:26
elgg_format_element($tag_name, array $attributes=array(), $text= '', array $options=array())
Format an HTML element.
Definition: output.php:218
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
elgg_view_menu($menu, array $vars=array())
Render a menu.
Definition: views.php:745
$defaults
Definition: longtext.php:17