You are here

function wsconfig_get_field_processors in Web Service Data 7

Get a list of processors which support fields

Parameters

array $types [optional]: List of field types

Return value

array Returns an array of key/value pairs of classnames and display names for supported processors.

2 calls to wsconfig_get_field_processors()
wsfields_storage_edit_field_form in modules/wsfields_storage/wsfields_storage.admin.inc
WSField Storage Settings edit form
wsfields_storage_settings_form in modules/wsfields_storage/wsfields_storage.admin.inc
Wsfields settings form

File

modules/wsconfig/wsconfig.module, line 587
Main module for wsconfig

Code

function wsconfig_get_field_processors($types = array()) {
  $field_processors = array();
  $defined_proc = variable_get('wsconfig_processors', array());
  foreach ($defined_proc as $classname => $value) {
    if (!empty($value['fields'])) {
      foreach ($value['fields'] as $type => $displaytext) {
        if (!empty($types) && in_array($type, $types) || empty($types)) {
          $field_processors[$classname] = $displaytext;
        }
      }
    }
  }
  return $field_processors;
}