StringDatabaseStorage::createTranslation

public StringDatabaseStorage::createTranslation($values = array())

Creates a string translation object bound to this storage but not saved.

Parameters

array $values: (optional) Array with initial values. Defaults to empty array.

Return value

\Drupal\locale\TranslationString New string translation object.

Overrides StringStorageInterface::createTranslation

File

core/modules/locale/src/StringDatabaseStorage.php, line 231

Class

StringDatabaseStorage
Defines a class to store localized strings in the database.

Namespace

Drupal\locale

Code

public function createTranslation($values = array()) {
  return new TranslationString($values + array(
    'storage' => $this,
    'is_new' => TRUE,
  ));
}
doc_Drupal
2016-10-29 09:45:06
Comments
Leave a Comment

Please login to continue.