function LocaleFile::__construct

Same name and namespace in other branches
  1. 11.x core/modules/locale/src/File/LocaleFile.php \Drupal\locale\File\LocaleFile::__construct()

Creates a LocaleFile object for tracking translation information.

Parameters

string $filename: The filename.

string $uri: The uri of the file.

string $hash: The hash using the LocaleSource::LOCAL_FILE_HASH_ALGO.

int|null $timestamp: The filemtime of the uri.

string|null $langcode: The langcode the translation is for.

string|null $project: The project the translation is for.

string|null $version: The project version the translation is for.

File

core/modules/locale/src/File/LocaleFile.php, line 53

Class

LocaleFile
Defines the locale file value object.

Namespace

Drupal\locale\File

Code

public function __construct(public string $filename, public string $uri, public string $hash, public ?int $timestamp = NULL, public ?string $langcode = NULL, public ?string $project = NULL, public ?string $version = NULL) {
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.