You are here

protected function PluralFormula::loadFormulae in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/locale/src/PluralFormula.php \Drupal\locale\PluralFormula::loadFormulae()

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

Return value

[]

3 calls to PluralFormula::loadFormulae()
PluralFormula::getFormula in core/modules/locale/src/PluralFormula.php
Gets the plural formula for a langcode.
PluralFormula::getNumberOfPlurals in core/modules/locale/src/PluralFormula.php
Returns the number of plurals supported by a given language.
PluralFormula::setPluralFormula in core/modules/locale/src/PluralFormula.php

File

core/modules/locale/src/PluralFormula.php, line 102
Contains \Drupal\locale\PluralFormula.

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', []);
  }
}