You are here

function filefield_sources_elements in FileField Sources 6

Implements hook_elements().

File

./filefield_sources.module, line 19
Extend FileField to allow files from multiple sources.

Code

function filefield_sources_elements() {
  $elements = array();
  foreach (module_invoke_all('filefield_sources_widgets') as $widget) {
    $elements[$widget]['#process'] = array(
      'filefield_sources_field_process',
    );
    $elements[$widget]['#pre_render'] = array(
      'filefield_sources_field_pre_render',
    );
    $elements[$widget]['#element_validate'] = array(
      'filefield_sources_field_validate',
    );
    $elements[$widget]['#filefield_value_callback'] = array(
      'filefield_sources_field_value',
    );
  }
  return $elements;
}