You are here

function filefield_paths_features_export_options in File (Field) Paths 6

Implements hook_features_export_options().

List all FileField Paths config settings currently available for export. This adds each of the configurations to the features UI where they can be chosen for bundling.

This UI may be entirely unneccessary if we only ever export as a part of something else (individual fields settings), but it's here for completeness.

Return value

array A keyed array of items, suitable for use with a FormAPI select or checkboxes element.

File

modules/features.inc, line 43
Features module integration.

Code

function filefield_paths_features_export_options() {
  $options = array();
  $result = db_query("SELECT * FROM {filefield_paths}");
  while ($row = db_fetch_object($result)) {

    // Generate the unique keys that can identify the row
    // "{node_type}-{field}" eg "story-field_illustration"
    $key = "{$row->type}-{$row->field}";
    $options[$key] = $key;
  }
  return $options;
}