function StringDatabaseStorage::dbStringTable

Same name in other branches
  1. 8.9.x core/modules/locale/src/StringDatabaseStorage.php \Drupal\locale\StringDatabaseStorage::dbStringTable()
  2. 10 core/modules/locale/src/StringDatabaseStorage.php \Drupal\locale\StringDatabaseStorage::dbStringTable()
  3. 11.x core/modules/locale/src/StringDatabaseStorage.php \Drupal\locale\StringDatabaseStorage::dbStringTable()

Gets table name for storing string object.

Parameters

\Drupal\locale\StringInterface $string: The string object.

Return value

string The table name.

File

core/modules/locale/src/StringDatabaseStorage.php, line 274

Class

StringDatabaseStorage
Defines a class to store localized strings in the database.

Namespace

Drupal\locale

Code

protected function dbStringTable($string) {
    if ($string->isSource()) {
        return 'locales_source';
    }
    elseif ($string->isTranslation()) {
        return 'locales_target';
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.