Documentation

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
see
MockPublicFormTest
service

civi.afform.tokens

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
see
CRM_Utils_Hook::alterMailContent

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
throws
CryptoException
Return values
string

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];

generateEmailVerificationUrl()

private static generateEmailVerificationUrl(int $submissionId) : string
Parameters
$submissionId : int
Return values
string

        
On this page

Search results