function _field_sql_storage_tablename

Generate a table name for a field data table.

Parameters

$field: The field structure.

Return value

A string containing the generated name for the database table

22 calls to _field_sql_storage_tablename()
FieldAttachStorageTestCase::testFieldHasData in drupal/modules/field/tests/field.test
Test field_has_data().
FieldSqlStorageTestCase::setUp in drupal/modules/field/modules/field_sql_storage/field_sql_storage.test
Sets up a Drupal site for running functional and integration tests.
FieldSqlStorageTestCase::testFieldSqlStorageForeignKeys in drupal/modules/field/modules/field_sql_storage/field_sql_storage.test
Test foreign key support.
FieldSqlStorageTestCase::testFieldStorageDetails in drupal/modules/field/modules/field_sql_storage/field_sql_storage.test
Test the storage details.
FieldSqlStorageTestCase::testFieldUpdateIndexesWithData in drupal/modules/field/modules/field_sql_storage/field_sql_storage.test
Test adding and removing indexes while data is present.

... See full list

2 string references to '_field_sql_storage_tablename'
field_sql_storage_field_storage_query in drupal/modules/field/modules/field_sql_storage/field_sql_storage.module
Implements hook_field_storage_query().
hook_field_storage_query in drupal/modules/field/field.api.php
Execute an EntityFieldQuery.

File

drupal/modules/field/modules/field_sql_storage/field_sql_storage.module, line 41
Default implementation of the field storage API.

Code

function _field_sql_storage_tablename($field) {
  if ($field['deleted']) {
    return "field_deleted_data_{$field['id']}";
  }
  else {
    return "field_data_{$field['field_name']}";
  }
}