TranslationString::delete

public TranslationString::delete() Deletes string object from storage. Return value $this Throws \Drupal\locale\StringStorageException In case of failures, an exception is thrown. Overrides StringBase::delete File core/modules/locale/src/TranslationString.php, line 117 Class TranslationString Defines the locale translation string object. Namespace Drupal\locale Code public function delete() { parent::delete(); $this->isNew = TRUE; return $this; }

TranslationString::getString

public TranslationString::getString() Gets plain string contained in this object. Return value string The string contained in this object. Overrides StringInterface::getString File core/modules/locale/src/TranslationString.php, line 86 Class TranslationString Defines the locale translation string object. Namespace Drupal\locale Code public function getString() { return isset($this->translation) ? $this->translation : ''; }

TranslationString::isNew

public TranslationString::isNew() Checks whether the object is not saved to storage yet. Return value bool TRUE if the object exists in the storage, FALSE otherwise. Overrides StringInterface::isNew File core/modules/locale/src/TranslationString.php, line 101 Class TranslationString Defines the locale translation string object. Namespace Drupal\locale Code public function isNew() { return $this->isNew; }

TranslationString::isSource

public TranslationString::isSource() Checks whether the object is a source string. Return value bool TRUE if the object is a source string, FALSE otherwise. Overrides StringInterface::isSource File core/modules/locale/src/TranslationString.php, line 72 Class TranslationString Defines the locale translation string object. Namespace Drupal\locale Code public function isSource() { return FALSE; }

TranslationString::isTranslation

public TranslationString::isTranslation() Checks whether the object is a translation string. Return value bool TRUE if the object is a translation string, FALSE otherwise. Overrides StringInterface::isTranslation File core/modules/locale/src/TranslationString.php, line 79 Class TranslationString Defines the locale translation string object. Namespace Drupal\locale Code public function isTranslation() { return !empty($this->lid) && !empty($this->language) && iss

TranslationString::save

public TranslationString::save() Saves string object to storage. Return value $this Throws \Drupal\locale\StringStorageException In case of failures, an exception is thrown. Overrides StringBase::save File core/modules/locale/src/TranslationString.php, line 108 Class TranslationString Defines the locale translation string object. Namespace Drupal\locale Code public function save() { parent::save(); $this->isNew = FALSE; return $this; }

TranslationString::setCustomized

public TranslationString::setCustomized($customized = TRUE) Sets the string as customized / not customized. Parameters bool $customized: (optional) Whether the string is customized or not. Defaults to TRUE. Return value \Drupal\locale\TranslationString The called object. File core/modules/locale/src/TranslationString.php, line 64 Class TranslationString Defines the locale translation string object. Namespace Drupal\locale Code public function setCustomized($customized = TRUE) { $th

TranslationString::setString

public TranslationString::setString($string) Sets the string contained in this object. Parameters string $string: String to set as value. Return value $this Overrides StringInterface::setString File core/modules/locale/src/TranslationString.php, line 93 Class TranslationString Defines the locale translation string object. Namespace Drupal\locale Code public function setString($string) { $this->translation = $string; return $this; }

TranslationString::__construct

public TranslationString::__construct($values = array()) Constructs a new locale string object. Parameters object|array $values: Object or array with initial values. Overrides StringBase::__construct File core/modules/locale/src/TranslationString.php, line 45 Class TranslationString Defines the locale translation string object. Namespace Drupal\locale Code public function __construct($values = array()) { parent::__construct($values); if (!isset($this->isNew)) { // We mark t

TranslatorInterface

Interface for objects capable of string translation. Hierarchy interface \Drupal\Core\StringTranslation\Translator\TranslatorInterface File core/lib/Drupal/Core/StringTranslation/Translator/TranslatorInterface.php, line 8 Namespace Drupal\Core\StringTranslation\Translator Members Name Modifiers Type Description TranslatorInterface::getStringTranslation public function Retrieves English string to given language. TranslatorInterface::reset public function Resets tr