public StringBase::delete()
Deletes string object from storage.
Return value
$this
Throws
\Drupal\locale\StringStorageException In case of failures, an exception is thrown.
Overrides StringInterface::delete
File
- core/modules/locale/src/StringBase.php, line 194
Class
- StringBase
- Defines the locale string base class.
Namespace
Drupal\locale
Code
1 2 3 4 5 6 7 8 9 10 11 | 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 ; } |
Please login to continue.