public function DefaultTableMapping::getFieldNames

public DefaultTableMapping::getFieldNames($table_name)

Gets a list of names of fields stored in the specified table.

Parameters

string $table_name: The name of the table to return the field names for.

Return value

string[] An array of field names for the given table.

Overrides TableMappingInterface::getFieldNames

File

core/lib/Drupal/Core/Entity/Sql/DefaultTableMapping.php, line 127

Class

DefaultTableMapping
Defines a default table mapping class.

Namespace

Drupal\Core\Entity\Sql

Code

public function getFieldNames($table_name) {
  if (isset($this->fieldNames[$table_name])) {
    return $this->fieldNames[$table_name];
  }
  return array();
}

© 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!Entity!Sql!DefaultTableMapping.php/function/DefaultTableMapping::getFieldNames/8.1.x