public function Schema::fieldNames

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

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

Parameters

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

Return value

An array of field names.

File

drupal/core/lib/Drupal/Core/Database/Schema.php, line 682
Definition of Drupal\Core\Database\Schema

Class

Schema

Namespace

Drupal\Core\Database

Code

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