Created
October 3, 2014 07:53
-
-
Save GoZOo/0f638d08d510a6bce5e2 to your computer and use it in GitHub Desktop.
Drupal 8 implements url
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
| in a hook, call Drupal::url() directly; | |
| in a controller or a form or something like that, use the UrlGeneratorTrait (for forms at least it's already there for you), | |
| for services, inject the 'url_generator' in your class by adding it in your service definition |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment