Elgg  Version 1.9
longtext.php
Go to the documentation of this file.
1 <?php
14 if (isset($vars['class'])) {
15  $vars['class'] = "elgg-input-longtext {$vars['class']}";
16 } else {
17  $vars['class'] = "elgg-input-longtext";
18 }
19 
20 $defaults = array(
21  'value' => '',
22  'rows' => '10',
23  'cols' => '50',
24  'id' => 'elgg-input-' . rand(), //@todo make this more robust
25 );
26 
27 $vars = array_merge($defaults, $vars);
28 
29 $value = $vars['value'];
30 unset($vars['value']);
31 
32 echo elgg_view_menu('longtext', array(
33  'sort_by' => 'priority',
34  'class' => 'elgg-menu-hz',
35  'id' => $vars['id'],
36 ));
37 
38 ?>
39 
40 <textarea <?php echo elgg_format_attributes($vars); ?>>
41 <?php echo htmlspecialchars($value, ENT_QUOTES, 'UTF-8'); ?>
42 </textarea>
$vars
Definition: longtext.php:27
$value
Definition: longtext.php:29
elgg_view_menu($menu_name, array $vars=array())
Render a menu.
Definition: views.php:687
elgg echo
Translates a string.
Definition: languages.js:43
$defaults
Definition: longtext.php:20