You are here

function field_extract_field_extract_info in Field Extract Values 7

Implements hook_field_extract_info().

File

./field_extract.module, line 285
Field extract - Extension of the Field API to allow proper extraction of field values from entities

Code

function field_extract_field_extract_info() {
  $extractors = array();

  // Find all the extractors for the standard field types
  $includes = file_scan_directory(drupal_get_path('module', 'field_extract') . '/includes', '/^[a-zA-Z0-9_]*.inc?/', array(
    'key' => 'name',
  ));
  foreach ($includes as $name => $include) {

    // for each one found, load the file
    require_once $include->uri;

    // and get the information, if available
    $function = "field_extract_{$name}_info";
    if (function_exists($function)) {
      $extractors[$name] = $function();
    }
  }
  return $extractors;
}