You are here

public function StringMongoDBStorage::delete in MongoDB 8

Delete string from storage.

Parameters

\Drupal\locale\StringInterface $string: The string object.

Return value

\Drupal\locale\StringStorageInterface The called object.

Throws

\Drupal\locale\StringStorageException In case of failures, an exception is thrown.

Overrides StringStorageInterface::delete

File

mongodb_locale/src/StringStorage.php, line 285

Class

StringMongoDBStorage

Namespace

Drupal\mongodb_locale

Code

public function delete($string) {
  $this->mongo
    ->get('locale')
    ->remove($this
    ->getIdCriteria($string
    ->getId()));
}