Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. DefaultTableMapping.php

function DefaultTableMapping::setFieldNames

Adds field columns for a table to the table mapping.

@internal

@todo Make this method protected in drupal:9.0.0.

Parameters

string $table_name: The name of the table to add the field column for.

string[] $field_names: A list of field names to add the columns for.

Return value

$this

See also

https://www.drupal.org/node/3067336

File

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

Class

DefaultTableMapping
Defines a default table mapping class.

Namespace

Drupal\Core\Entity\Sql

Code

public function setFieldNames($table_name, array $field_names) {
    $this->fieldNames[$table_name] = $field_names;
    // Force the re-computation of the column list.
    unset($this->allColumns[$table_name]);
    return $this;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal