1 schema.inc public DatabaseSchema::fieldNames(array $fields)

Return an array of field names from an array of key/index column map.

This is usually an identity function but if a key/index uses a column prefix specification, this function extracts just the name.

Parameters

array $fields: An array of key/index column specifiers.

Return value

array: An array of field names.

File

core/includes/database/schema.inc, line 717
Generic Database schema code.

Class

DatabaseSchema
Base class for database schema definitions.

Code

public function fieldNames(array $fields) {
  $return = array();
  foreach ($fields as $field) {
    if (is_array($field)) {
      $return[] = $field[0];
    }
    else {
      $return[] = $field;
    }
  }
  return $return;
}