You are here

function _serial_get_all_fields in Serial Field 7

Retrieves all the managed serial fields.

Return value

string[] Result set containing entity type, entity bundle, field name.

2 calls to _serial_get_all_fields()
serial_schema in ./serial.install
Implements hook_schema().
serial_update_7130 in ./serial.install
Upgrade path.

File

./serial.inc, line 240
Internal functions for the Serial module.

Code

function _serial_get_all_fields() {
  $query = db_select('field_config', 'f');
  $query
    ->join('field_config_instance', 'i', 'i.field_name = f.field_name');
  return $query
    ->fields('i', array(
    'entity_type',
    'bundle',
    'field_name',
  ))
    ->condition('f.type', SERIAL_FIELD_TYPE)
    ->condition('i.deleted', 0)
    ->execute()
    ->fetchAll();
}