Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. StringBase.php

function StringBase::save

Overrides StringInterface::save

2 calls to StringBase::save()
TranslationString::save in core/modules/locale/src/TranslationString.php
Saves string object to storage.
TranslationString::save in core/modules/locale/src/TranslationString.php
Saves string object to storage.
1 method overrides StringBase::save()
TranslationString::save in core/modules/locale/src/TranslationString.php
Saves string object to storage.

File

core/modules/locale/src/StringBase.php, line 183

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('The string cannot be saved because its not bound to a storage: ' . $this->getString());
    }
    return $this;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal