function _field_sql_storage_tablename

You are here

7 field_sql_storage.module _field_sql_storage_tablename($field)

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

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

... See full list

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

File

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']}";
  }
}