Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. TranslationString.php

function TranslationString::__construct

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 = []) {
    parent::__construct($values);
    if (!isset($this->isNew)) {
        // 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->isNew = !$this->isTranslation();
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal