Last active
July 13, 2020 15:40
-
-
Save adrianodias8/5c5e77eab772bf46fcc940ddeecedc6b to your computer and use it in GitHub Desktop.
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
| diff --git a/cas.tokens.inc b/cas.tokens.inc | |
| index 97aea2b..b0eb797 100644 | |
| --- a/cas.tokens.inc | |
| +++ b/cas.tokens.inc | |
| @@ -29,6 +29,10 @@ function cas_token_info() { | |
| 'name' => t('Login URL'), | |
| 'description' => t('The CAS login URL.'), | |
| ], | |
| + 'login-url-absolute' => [ | |
| + 'name' => t('Login URL (absolute)'), | |
| + 'description' => t('The CAS login URL.'), | |
| + ], | |
| ], | |
| ], | |
| ]; | |
| @@ -59,6 +63,9 @@ function cas_tokens($type, $tokens, array $data, array $options, BubbleableMetad | |
| case 'login-url': | |
| $replacements[$original] = Url::fromRoute('cas.login')->toString(); | |
| break; | |
| + case 'login-url-absolute': | |
| + $replacements[$original] = Url::fromRoute('cas.login', [], ['absolute' => TRUE])->toString(); | |
| + break; | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment