You are here

public function TokenSettingTypeBase::getTokenService in UI Patterns Settings 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/TokenSettingTypeBase.php \Drupal\ui_patterns_settings\Plugin\TokenSettingTypeBase::getTokenService()

Gets the token service.

Return value

\Drupal\Core\Utility\Token The token service.

File

src/Plugin/TokenSettingTypeBase.php, line 112

Class

TokenSettingTypeBase

Namespace

Drupal\ui_patterns_settings\Plugin

Code

public function getTokenService() {
  if (!$this->tokenService) {
    $this->tokenService = \Drupal::token();
  }
  return $this->tokenService;
}