Documentation

CRM_OAuth_MailSetup
in package

Table of Contents

Methods

alterMailStore()  : mixed
If we have a stored token for this for this, then use it.
buildSetupLinks()  : mixed
Return a list of setup-options based on OAuth2 services.
evalArrayTemplate()  : array<string|int, mixed>
onReturn()  : mixed
When the user returns with a token, we add a new record to civicrm_mail_settings with defaults and redirect to the edit screen.
setup()  : array<string|int, mixed>
When a user chooses to add one of our mail options, we kick off the authorization-code workflow.

Methods

alterMailStore()

If we have a stored token for this for this, then use it.

public static alterMailStore(mixed &$mailSettings) : mixed
Parameters
$mailSettings : mixed
Tags
see
CRM_Utils_Hook::alterMailStore()

evalArrayTemplate()

public static evalArrayTemplate(array<string|int, mixed> $template, array<string|int, mixed> $vars) : array<string|int, mixed>
Parameters
$template : array<string|int, mixed>

List of key-value expressions. Ex: ['name' => '{{person.first}} {{person.last}}'] Expressions begin with the dotted-name of a variable. Optionally, the value may be piped through other functions

$vars : array<string|int, mixed>

Array tree of data to interpolate.

Return values
array<string|int, mixed>

The template array, with '{{...}}' expressions evaluated.

onReturn()

When the user returns with a token, we add a new record to civicrm_mail_settings with defaults and redirect to the edit screen.

public static onReturn(array<string|int, mixed> $token, string &$nextUrl) : mixed
Parameters
$token : array<string|int, mixed>

OAuthSysToken

$nextUrl : string

setup()

When a user chooses to add one of our mail options, we kick off the authorization-code workflow.

public static setup(array<string|int, mixed> $setupAction) : array<string|int, mixed>
Parameters
$setupAction : array<string|int, mixed>

The chosen descriptor from mailSetupActions.

Tags
see
CRM_Utils_Hook::mailSetupActions()
Return values
array<string|int, mixed>

With keys:

  • url: string, the final URL to go to.

        
On this page

Search results