You are here

function filefield_sources_field_value in FileField Sources 6

Same name and namespace in other branches
  1. 8 filefield_sources.module \filefield_sources_field_value()
  2. 7 filefield_sources.module \filefield_sources_field_value()

A #filefield_value_callback to run source value callbacks.

1 string reference to 'filefield_sources_field_value'
filefield_sources_elements in ./filefield_sources.module
Implements hook_elements().

File

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

Code

function filefield_sources_field_value($element, &$item) {

  // Do all processing as needed by each source.
  $sources = filefield_sources_info();
  foreach ($sources as $source) {
    if (isset($source['value'])) {
      $function = $source['value'];
      $function($element, $item);
    }
  }
}