public function StringBase::save

Implements Drupal\locale\LocaleString::save().

Overrides StringInterface::save

1 call to StringBase::save()
TranslationString::save in drupal/core/modules/locale/lib/Drupal/locale/TranslationString.php
Implements Drupal\locale\StringInterface::save().
1 method overrides StringBase::save()
TranslationString::save in drupal/core/modules/locale/lib/Drupal/locale/TranslationString.php
Implements Drupal\locale\StringInterface::save().

File

drupal/core/modules/locale/lib/Drupal/locale/StringBase.php, line 186
Definition of Drupal\locale\StringBase.

Class

StringBase
Defines the locale string base class.

Namespace

Drupal\locale

Code

public function save() {
  if ($storage = $this
    ->getStorage()) {
    $storage
      ->save($this);
  }
  else {
    throw new StringStorageException(format_string('The string cannot be saved because its not bound to a storage: @string', array(
      '@string' => $string
        ->getString(),
    )));
  }
  return $this;
}