function PluralFormula::getFormula

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

Overrides PluralFormulaInterface::getFormula

File

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

Class

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

Namespace

Drupal\locale

Code

public function getFormula($langcode) {
    $this->loadFormulae();
    return isset($this->formulae[$langcode]['formula']) ? $this->formulae[$langcode]['formula'] : FALSE;
}

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