You are here

public function StringBase::getPlurals in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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 102
Contains \Drupal\locale\StringBase.

Class

StringBase
Defines the locale string base class.

Namespace

Drupal\locale

Code

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