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
23 calls to _field_sql_storage_tablename()
- FieldAttachStorageTestCase::testFieldHasData in modules/
field/ tests/ field.test - Test field_has_data().
- FieldSchemaAlterTestCase::testImageFieldSchemaAlter in modules/
field/ tests/ field.test - Tests a hook_field_schema_alter() implementation.
- 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.
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
Code
function _field_sql_storage_tablename($field) {
if ($field['deleted']) {
return "field_deleted_data_{$field['id']}";
}
else {
return "field_data_{$field['field_name']}";
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.