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

Breadcrumb

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

function StringBase::delete

Overrides StringInterface::delete

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

File

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

Class

StringBase
Defines the locale string base class.

Namespace

Drupal\locale

Code

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;
}

API Navigation

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