Documentation

CRM_OAuth_ContactFromToken
in package

Table of Contents

Methods

createContact()  : array<string|int, mixed>
Given a token, we add a new record to civicrm_contact based on the provider's template
evalArrayTemplate()  : array<string|int, mixed>

Methods

createContact()

Given a token, we add a new record to civicrm_contact based on the provider's template

public static createContact(array<string|int, mixed> $token) : array<string|int, mixed>
Parameters
$token : array<string|int, mixed>
Return values
array<string|int, mixed>

evalArrayTemplate()

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

Array of key-value expressions. Arrays can be nested. Ex: ['name' => '{{person.first}} {{person.last}}']

Expressions begin with a variable name; a string followed by a dot denotes an array key. Ex: {{person.first}} means $vars['person']['first'].

Optionally, the value may be piped through other 'filter' functions. Ex: {{person.first|lowercase}}

$vars : array<string|int, mixed>

Array tree of data to interpolate.

Return values
array<string|int, mixed>

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


        
On this page

Search results