Elgg  Version 4.3
file.php
Go to the documentation of this file.
1 <?php
10 if (!empty($vars['value'])) {
11  echo elgg_format_element('div', [
12  'class' => 'elgg-state elgg-state-warning',
13  ], elgg_echo('fileexists'));
14 
15  unset($vars['value']); // the value attribute isn't supported for file inputs
16 }
17 
18 $vars['class'] = elgg_extract_class($vars, 'elgg-input-file');
19 
21  'disabled' => false,
22  'type' => 'file'
23 ];
24 
25 $vars = array_merge($defaults, $vars);
26 
elgg_echo($message_key, array $args=[], $language="")
Elgg language module Functions to manage language and translations.
Definition: languages.php:18
elgg_extract_class(array $array, $existing=[], $extract_key= 'class')
Extract class names from an array, optionally merging into a preexisting set.
Definition: elgglib.php:569
elgg_format_element($tag_name, array $attributes=[], $text= '', array $options=[])
Format an HTML element.
Definition: output.php:135
$defaults
Definition: file.php:20
elgg echo
Translates a string.
Definition: deprecated.js:530
if(!empty($vars['value'])) $vars['class']
Elgg file input Displays a file input field.
Definition: file.php:18