You are here

public function DefaultTableMapping::getExtraColumns in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Entity/Sql/DefaultTableMapping.php \Drupal\Core\Entity\Sql\DefaultTableMapping::getExtraColumns()
  2. 9 core/lib/Drupal/Core/Entity/Sql/DefaultTableMapping.php \Drupal\Core\Entity\Sql\DefaultTableMapping::getExtraColumns()

Gets a list of extra database columns, which store denormalized data.

These database columns do not belong to any entity fields. Any normalized data that is stored should be associated with an entity field.

Parameters

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

Return value

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

Overrides TableMappingInterface::getExtraColumns

1 call to DefaultTableMapping::getExtraColumns()
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 470

Class

DefaultTableMapping
Defines a default table mapping class.

Namespace

Drupal\Core\Entity\Sql

Code

public function getExtraColumns($table_name) {
  if (isset($this->extraColumns[$table_name])) {
    return $this->extraColumns[$table_name];
  }
  return [];
}