function StringDatabaseStorage::dbFieldTable
Same name in other branches
- 8.9.x core/modules/locale/src/StringDatabaseStorage.php \Drupal\locale\StringDatabaseStorage::dbFieldTable()
- 10 core/modules/locale/src/StringDatabaseStorage.php \Drupal\locale\StringDatabaseStorage::dbFieldTable()
- 11.x core/modules/locale/src/StringDatabaseStorage.php \Drupal\locale\StringDatabaseStorage::dbFieldTable()
Gets table alias for field.
Parameters
string $field: One of the field names of the locales_source, locates_location, locales_target tables to find the table alias for.
Return value
string One of the following values:
- 's' for "source", "context", "version" (locales_source table fields).
- 'l' for "type", "name" (locales_location table fields)
- 't' for "language", "translation", "customized" (locales_target table fields)
1 call to StringDatabaseStorage::dbFieldTable()
- StringDatabaseStorage::dbStringSelect in core/
modules/ locale/ src/ StringDatabaseStorage.php - Builds a SELECT query with multiple conditions and fields.
File
-
core/
modules/ locale/ src/ StringDatabaseStorage.php, line 253
Class
- StringDatabaseStorage
- Defines a class to store localized strings in the database.
Namespace
Drupal\localeCode
protected function dbFieldTable($field) {
if (in_array($field, [
'language',
'translation',
'customized',
])) {
return 't';
}
elseif (in_array($field, [
'type',
'name',
])) {
return 'l';
}
else {
return 's';
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.