You are here

protected function WebformTokenManager::getSuffixes in Webform 6.x

Same name and namespace in other branches
  1. 8.5 src/WebformTokenManager.php \Drupal\webform\WebformTokenManager::getSuffixes()

Get an array of supported token suffixes.

Parameters

array $options: A keyed array of settings and flags to control the token replacement process.

Return value

array An array of supported token suffixes,

1 call to WebformTokenManager::getSuffixes()
WebformTokenManager::replace in src/WebformTokenManager.php
Replace tokens in text.

File

src/WebformTokenManager.php, line 375

Class

WebformTokenManager
Defines a class to manage token replacement.

Namespace

Drupal\webform

Code

protected function getSuffixes(array $options) {
  $suffixes = static::$suffixes;

  // Unset any $option['suffixes'] set to FALSE.
  if (isset($options['suffixes'])) {
    foreach ($suffixes as $index => $suffix) {
      if (isset($options['suffixes'][$suffix]) && $options['suffixes'][$suffix] === FALSE) {
        unset($suffixes[$index]);
      }
    }
  }
  return $suffixes;
}