function file_element_info
Implements hook_element_info().
The managed file element may be used anywhere in Drupal.
File
-
modules/
file/ file.module, line 61
Code
function file_element_info() {
$file_path = drupal_get_path('module', 'file');
$types['managed_file'] = array(
'#input' => TRUE,
'#process' => array(
'file_managed_file_process',
),
'#value_callback' => 'file_managed_file_value',
'#element_validate' => array(
'file_managed_file_validate',
),
'#pre_render' => array(
'file_managed_file_pre_render',
),
'#theme' => 'file_managed_file',
'#theme_wrappers' => array(
'form_element',
),
'#progress_indicator' => 'throbber',
'#progress_message' => NULL,
'#upload_validators' => array(),
'#upload_location' => NULL,
'#size' => 22,
'#extended' => FALSE,
'#attached' => array(
'css' => array(
$file_path . '/file.css',
),
'js' => array(
$file_path . '/file.js',
),
),
);
return $types;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.