You are here

public function StringBase::getPlurals in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/locale/src/StringBase.php \Drupal\locale\StringBase::getPlurals()

Splits string to work with plural values.

Return value

array Array of strings that are plural variants.

Overrides StringInterface::getPlurals

File

core/modules/locale/src/StringBase.php, line 99

Class

StringBase
Defines the locale string base class.

Namespace

Drupal\locale

Code

public function getPlurals() {
  return explode(PoItem::DELIMITER, $this
    ->getString());
}