DefaultTableMapping::getFieldNames

public DefaultTableMapping::getFieldNames($table_name)

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

The return list is contains the entity field names, not database field (i.e. column) names. To get the mapping of specific entity field to database columns use ::getColumnNames().

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();
}
doc_Drupal
2016-10-29 09:01:54
Comments
Leave a Comment

Please login to continue.