public function TranslationString::__construct in Drupal 10
Same name and namespace in other branches
- 8 core/modules/locale/src/TranslationString.php \Drupal\locale\TranslationString::__construct()
- 9 core/modules/locale/src/TranslationString.php \Drupal\locale\TranslationString::__construct()
File
- core/
modules/ locale/ src/ TranslationString.php, line 45
Class
- TranslationString
- Defines the locale translation string object.
Namespace
Drupal\localeCode
public function __construct($values = []) {
parent::__construct($values);
if (!isset($this->isNew)) {
// We mark the string as not new if it is a complete translation.
// This will work when loading from database, otherwise the storage
// controller that creates the string object must handle it.
$this->isNew = !$this
->isTranslation();
}
}