You are here

function _filefield_paths_get_field_types in File (Field) Paths 7

Provides a list of all available field types for use with File (Field) Paths.

Parameters

bool|FALSE $reset:

Return value

array

4 calls to _filefield_paths_get_field_types()
drush_filefield_paths_ffp_update in ./filefield_paths.drush.inc
Retroactively updates all File (Field) Paths of a chosen field instance.
filefield_paths_field_storage_pre_update in ./filefield_paths.module
Implements hook_field_storage_pre_update().
filefield_paths_form_alter in ./filefield_paths.module
Implements hook_form_alter().
filefield_paths_update_7107 in ./filefield_paths.install
Removed filefield_paths table/schema.

File

./filefield_paths.module, line 664
Contains core functions for the File (Field) Paths module.

Code

function _filefield_paths_get_field_types($reset = FALSE) {
  $field_types =& drupal_static(__FUNCTION__);
  if (empty($field_types) || $reset) {
    $field_types = module_invoke_all('filefield_paths_field_type_info');
    $field_types = array_flip($field_types);
    foreach (array_keys($field_types) as $type) {
      $info = field_info_field_types($type);
      $field_types[$type] = array(
        'label' => $info['label'],
      );
    }
  }
  return $field_types;
}