function PluralFormula::loadFormulae

Same name in other branches
  1. 9 core/modules/locale/src/PluralFormula.php \Drupal\locale\PluralFormula::loadFormulae()
  2. 8.9.x core/modules/locale/src/PluralFormula.php \Drupal\locale\PluralFormula::loadFormulae()
  3. 10 core/modules/locale/src/PluralFormula.php \Drupal\locale\PluralFormula::loadFormulae()

Loads the formulae and stores them on the PluralFormula object if not set.

3 calls to PluralFormula::loadFormulae()
PluralFormula::getFormula in core/modules/locale/src/PluralFormula.php
PluralFormula::getNumberOfPlurals in core/modules/locale/src/PluralFormula.php
PluralFormula::setPluralFormula in core/modules/locale/src/PluralFormula.php

File

core/modules/locale/src/PluralFormula.php, line 98

Class

PluralFormula
Manages the storage of plural formula per language in state.

Namespace

Drupal\locale

Code

protected function loadFormulae() {
    if (!isset($this->formulae)) {
        $this->formulae = $this->state
            ->get('locale.translation.formulae', []);
    }
}

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