function DefaultTableMapping::getFieldNames
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/Entity/Sql/DefaultTableMapping.php \Drupal\Core\Entity\Sql\DefaultTableMapping::getFieldNames()
- 10 core/lib/Drupal/Core/Entity/Sql/DefaultTableMapping.php \Drupal\Core\Entity\Sql\DefaultTableMapping::getFieldNames()
- 9 core/lib/Drupal/Core/Entity/Sql/DefaultTableMapping.php \Drupal\Core\Entity\Sql\DefaultTableMapping::getFieldNames()
- 8.9.x core/lib/Drupal/Core/Entity/Sql/DefaultTableMapping.php \Drupal\Core\Entity\Sql\DefaultTableMapping::getFieldNames()
Gets a list of names for entity fields stored in the specified table.
Parameters
string $table_name: The name of the table to return the field names for.
Return value
string[] A list of field names for the given table. Note these are entity field names, not database field (i.e. column) names. To get the mapping of a specific entity field to database columns, use ::getColumnNames().
Overrides TableMappingInterface::getFieldNames
1 call to DefaultTableMapping::getFieldNames()
- DefaultTableMapping::getAllColumns in core/
lib/ Drupal/ Core/ Entity/ Sql/ DefaultTableMapping.php - Gets a list of all database columns for a given table.
File
-
core/
lib/ Drupal/ Core/ Entity/ Sql/ DefaultTableMapping.php, line 350
Class
- DefaultTableMapping
- Defines a default table mapping class.
Namespace
Drupal\Core\Entity\SqlCode
public function getFieldNames($table_name) {
if (isset($this->fieldNames[$table_name])) {
return $this->fieldNames[$table_name];
}
return [];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.