You are here

public function TranslationString::__construct in Localization update 7.2

Overrides StringBase::__construct().

Overrides StringBase::__construct

File

includes/locale/TranslationString.php, line 49
Definition of TranslationString.

Class

TranslationString
Defines the locale translation string object.

Code

public function __construct($values = array()) {
  parent::__construct($values);
  if (!isset($this->is_new)) {

    // We mark the string as not new if it is a complete translation.
    // This will work when loading from database, otherwise the storage
    // controller that creates the string object must handle it.
    $this->is_new = !$this
      ->isTranslation();
  }
}