Search for formula

  1. Search 7.x for formula
  2. Search 9.5.x for formula
  3. Search 8.9.x for formula
  4. Search 11.x for formula
  5. Other projects
Title Object type File name Summary
locale.plural.formula service core/modules/locale/locale.services.yml Drupal\locale\PluralFormula
PluralFormula class core/modules/locale/src/PluralFormula.php Manages the storage of plural formula per language in state.
PluralFormula.php file core/modules/locale/src/PluralFormula.php
PluralFormula::$formulae property core/modules/locale/src/PluralFormula.php The plural formula and count keyed by langcode.
PluralFormula::$languageManager property core/modules/locale/src/PluralFormula.php
PluralFormula::$state property core/modules/locale/src/PluralFormula.php
PluralFormula::getFormula function core/modules/locale/src/PluralFormula.php
PluralFormula::getNumberOfPlurals function core/modules/locale/src/PluralFormula.php
PluralFormula::loadFormulae function core/modules/locale/src/PluralFormula.php Loads the formulae and stores them on the PluralFormula object if not set.
PluralFormula::reset function core/modules/locale/src/PluralFormula.php
PluralFormula::setPluralFormula function core/modules/locale/src/PluralFormula.php
PluralFormula::__construct function core/modules/locale/src/PluralFormula.php
PluralFormulaInterface interface core/modules/locale/src/PluralFormulaInterface.php An interface for a service providing plural formulae.
PluralFormulaInterface.php file core/modules/locale/src/PluralFormulaInterface.php
PluralFormulaInterface::getFormula function core/modules/locale/src/PluralFormulaInterface.php Gets the plural formula for a langcode.
PluralFormulaInterface::getNumberOfPlurals function core/modules/locale/src/PluralFormulaInterface.php Returns the number of plurals supported by a given language.
PluralFormulaInterface::reset function core/modules/locale/src/PluralFormulaInterface.php Resets the static formulae cache.
PluralFormulaInterface::setPluralFormula function core/modules/locale/src/PluralFormulaInterface.php
PoHeader::tokenizeFormula function core/lib/Drupal/Component/Gettext/PoHeader.php Tokenize the formula.
PoHeaderTest::providerTestPluralsFormula function core/tests/Drupal/Tests/Component/Gettext/PoHeaderTest.php Data provider for testPluralsFormula.
PoHeaderTest::testPluralsFormula function core/tests/Drupal/Tests/Component/Gettext/PoHeaderTest.php Tests that plural expressions are evaluated correctly.

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