function StringBase::save
Same name in other branches
- 9 core/modules/locale/src/StringBase.php \Drupal\locale\StringBase::save()
- 8.9.x core/modules/locale/src/StringBase.php \Drupal\locale\StringBase::save()
- 10 core/modules/locale/src/StringBase.php \Drupal\locale\StringBase::save()
Overrides StringInterface::save
1 call to StringBase::save()
- TranslationString::save in core/
modules/ locale/ src/ TranslationString.php
1 method overrides StringBase::save()
- TranslationString::save in core/
modules/ locale/ src/ TranslationString.php
File
-
core/
modules/ locale/ src/ StringBase.php, line 183
Class
- StringBase
- Defines the locale string base class.
Namespace
Drupal\localeCode
public function save() {
if ($storage = $this->getStorage()) {
$storage->save($this);
}
else {
throw new StringStorageException('The string cannot be saved because its not bound to a storage: ' . $this->getString());
}
return $this;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.