public function TokenSettingTypeBase::getTokenService in UI Patterns Settings 8.2
Same name and namespace in other branches
- 8 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 107
Class
- TokenSettingTypeBase
- Base class for setting types with tokens.
Namespace
Drupal\ui_patterns_settings\PluginCode
public function getTokenService() {
if (!$this->tokenService) {
$this->tokenService = \Drupal::token();
}
return $this->tokenService;
}