Implements Drupal\locale\LocaleString::delete().
Overrides StringInterface::delete
public function delete() {
if (!$this
->isNew()) {
if ($storage = $this
->getStorage()) {
$storage
->delete($this);
}
else {
throw new StringStorageException(format_string('The string cannot be deleted because its not bound to a storage: @string', array(
'@string' => $string
->getString(),
)));
}
}
return $this;
}