public Schema::fieldNames($fields)
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.
$fields: An array of key/index column specifiers.
An array of field names.
public function fieldNames($fields) { $return = array(); foreach ($fields as $field) { if (is_array($field)) { $return[] = $field[0]; } else { $return[] = $field; } } return $return; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Database!Schema.php/function/Schema::fieldNames/8.1.x