You are here

function itoggle_field_get_fields in iToggle 7.2

Return all iToggle field names. This is mostly a helper function for the iToggle Views module.

1 call to itoggle_field_get_fields()
itoggle_views_views_data_alter in modules/views/itoggle_views.module
Implements hook_views_data_alter().

File

modules/field/itoggle_field.module, line 366
iToggle Field module.

Code

function itoggle_field_get_fields() {
  static $fields;
  if (!isset($fields)) {
    $fields = array();
    $result = db_select('field_config', 'fc')
      ->fields('fc', array(
      'field_name',
    ))
      ->condition('module', 'itoggle_field', '=')
      ->execute();
    foreach ($result as $row) {
      $fields[] = $row->field_name;
    }
  }
  return $fields;
}