Tokens
extends AutoService
in package
implements
EventSubscriberInterface
Every afform with the property `is_token=true` should have a corresponding set of tokens, `{afform.myFormUrl}` and `{afform.myFormLink}`.
Tags
Table of Contents
Interfaces
- EventSubscriberInterface
Properties
- $jwtScope : mixed
- $placement : mixed
- $prefix : mixed
Methods
- applyCkeditorWorkaround() : mixed
- CKEditor makes it hard to set an `href` to a token, so we often get this munged `'http://{token}` data.
- createUrl() : string
- Generate an authenticated URL for viewing this form.
- evaluateTokens() : mixed
- getSubscribedEvents() : array<string|int, mixed>
- getTokenForms() : array<string|int, mixed>
- Get a list of forms that have token support enabled.
- listTokens() : mixed
- generateEmailVerificationUrl() : string
Properties
$jwtScope
private
static mixed
$jwtScope
= 'afform'
$placement
private
static mixed
$placement
= 'msg_token_single'
$prefix
private
static mixed
$prefix
= 'form'
Methods
applyCkeditorWorkaround()
CKEditor makes it hard to set an `href` to a token, so we often get this munged `'http://{token}` data.
public
static applyCkeditorWorkaround(GenericHookEvent $e) : mixed
Parameters
- $e : GenericHookEvent
Tags
createUrl()
Generate an authenticated URL for viewing this form.
public
static createUrl(array<string|int, mixed> $afform, int $contactId) : string
Parameters
- $afform : array<string|int, mixed>
- $contactId : int
Tags
Return values
stringevaluateTokens()
public
static evaluateTokens(TokenValueEvent $e) : mixed
Parameters
- $e : TokenValueEvent
getSubscribedEvents()
public
static getSubscribedEvents() : array<string|int, mixed>
Return values
array<string|int, mixed>getTokenForms()
Get a list of forms that have token support enabled.
public
static getTokenForms() : array<string|int, mixed>
Return values
array<string|int, mixed> —$result[$formName] = ['name' => $formName, 'title' => $formTitle, 'server_route' => $route];
listTokens()
public
static listTokens(TokenRegisterEvent $e) : mixed
Parameters
- $e : TokenRegisterEvent
generateEmailVerificationUrl()
private
static generateEmailVerificationUrl(int $submissionId) : string
Parameters
- $submissionId : int