protected function StringDatabaseStorage::dbFieldTable in Drupal 10
Same name and namespace in other branches
- 8 core/modules/locale/src/StringDatabaseStorage.php \Drupal\locale\StringDatabaseStorage::dbFieldTable()
- 9 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)
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';
}
}