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

25 calls to _field_sql_storage_tablename()
++field_sql_storage_field_storage_write in modules/field/modules/field_sql_storage/field_sql_storage.module
Implements hook_field_storage_write().
++hook_field_storage_write in modules/field/field.api.php
Write field data for an entity.
FieldAttachStorageTestCase::testFieldHasData in modules/field/tests/field.test
Test field_has_data().
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.

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