You are here

public function StringBase::delete in Localization update 7.2

Implements LocaleString::delete().

Overrides StringInterface::delete

1 call to StringBase::delete()
TranslationString::delete in includes/locale/TranslationString.php
Implements StringInterface::delete().
1 method overrides StringBase::delete()
TranslationString::delete in includes/locale/TranslationString.php
Implements StringInterface::delete().

File

includes/locale/StringBase.php, line 206
Definition of StringBase.

Class

StringBase
Defines the locale string base class.

Code

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' => $this
          ->getString(),
      )));
    }
  }
  return $this;
}