Created
June 1, 2018 06:20
-
-
Save miteshmap/9994af03fd7edfa889ee252289190d06 to your computer and use it in GitHub Desktop.
Drupal 8: Service Decorators: TokenServiceProvider.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Replace drupal core token service with our own. | |
| */ | |
| class TokenServiceProvider extends ServiceProviderBase { | |
| /** | |
| * {@inheritdoc} | |
| */ | |
| public function alter(ContainerBuilder $container) { | |
| $definition = $container->getDefinition('token'); | |
| $definition->setClass('\Drupal\token\Token'); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment