public function StringBase::delete in Drupal 10
Same name and namespace in other branches
- 8 core/modules/locale/src/StringBase.php \Drupal\locale\StringBase::delete()
- 9 core/modules/locale/src/StringBase.php \Drupal\locale\StringBase::delete()
File
- core/
modules/ locale/ src/ StringBase.php, line 196
Class
- StringBase
- Defines the locale string base class.
Namespace
Drupal\localeCode
public function delete() {
if (!$this
->isNew()) {
if ($storage = $this
->getStorage()) {
$storage
->delete($this);
}
else {
throw new StringStorageException('The string cannot be deleted because its not bound to a storage: ' . $this
->getString());
}
}
return $this;
}