protected StringDatabaseStorage::dbStringKeys($string)
Gets keys values that are in a database table.
Parameters
\Drupal\locale\StringInterface $string: The string object.
Return value
array Array with key fields if the string has all keys, or empty array if not.
File
- core/modules/locale/src/StringDatabaseStorage.php, line 291
Class
- StringDatabaseStorage
- Defines a class to store localized strings in the database.
Namespace
Drupal\locale
Code
protected function dbStringKeys($string) {
if ($string->isSource()) {
$keys = array('lid');
}
elseif ($string->isTranslation()) {
$keys = array('lid', 'language');
}
if (!empty($keys) && ($values = $string->getValues($keys)) && count($keys) == count($values)) {
return $values;
}
else {
return array();
}
}
Please login to continue.