Issue #3104071 by jungle, knyshuk.vova: DrupalDateTime::$formatTranslationCache should be an array

merge-requests/2419/head
Alex Pott 2020-02-26 13:20:41 +00:00
parent 3c5abe40c8
commit ceaf783d0b
No known key found for this signature in database
GPG Key ID: 31905460D4A69276
1 changed files with 27 additions and 2 deletions

View File

@ -23,9 +23,34 @@ class DrupalDateTime extends DateTimePlus {
use StringTranslationTrait;
/**
* Format string translation cache.
* Formatted strings translation cache.
*
* @var string
* Translation cache represents an instance storage for formatted date
* strings. It contains a multidimensional array where:
* - first level keys - are drupal language codes;
* - second level keys - are each symbols of given format string (like 'F');
* - third level keys - are original matched strings related to the symbol;
* - values - are translated or not-translated original strings (depends on
* if a particular symbol represents translatable value according to PHP's
* date() format character).
*
* For example:
* @code
* [
* 'en' => [
* 'F' => [
* 'November' => t('November'),
* 'December' => t('December'),
* ],
* 'd' => [
* '10' => '10',
* '31' => '31',
* ],
* ],
* ]
* @endcode
*
* @var array
*/
protected $formatTranslationCache;