class CRM_Contact_Page_AJAX

This class contains all contact related functions that are called using AJAX (jQuery)

Constants

CHECK_USERNAME_TTL

AUTOCOMPLETE_TTL

Methods

static 
contactReference()

Ajax callback for custom fields of type ContactReference

static 
getPCPList()

Fetch PCP ID by PCP Supporter sort_name, also displays PCP title and associated Contribution Page title

static 
relationship()

No description

static 
customField()

Fetch the custom field help.

static 
groupTree()

No description

static 
deleteCustomValue()

Delete custom value.

static 
checkUserName()

check the CMS username.

static 
getContactEmail()

Function to get email address of a contact.

static 
getContactPhone()

No description

static 
buildSubTypes()

No description

static 
buildDedupeRules()

No description

static 
dashboard()

Function used for CiviCRM dashboard operations.

static 
getSignature()

Retrieve signature based on email id.

static 
processDupes()

Process dupes.

static 
getDedupes()

Retrieve list of duplicate pairs from cache table.

static array
getSearchOptionsFromRequest()

Get the searchable options from the request.

static bool
isOrQuery()

Is the query an OR query.

static CRM_Core_DAO|mixed|null
markNonDuplicates(int $cid, int $oid, "dupe-nondupe|nondupe-dupe" $oper)

Mark not duplicates.

pdfFormat()

Retrieve a PDF Page Format for the PDF Letter form.

static 
paperSize()

Retrieve Paper Size dimensions.

static 
flipDupePairs(int $prevNextId = NULL)

Swap contacts in a dupe pair i.e main with duplicate contact.

static 
selectUnselectContacts()

Used to store selected contacts across multiple pages in advanced search.

static string
_convertToId(string $name)

No description

static 
getAddressDisplay()

No description

static 
toggleDedupeSelect()

Mark dupe pairs as selected from un-selected state or vice-versa, in dupe cache table.

static 
getContactRelationships()

Retrieve contact relationships.

Details

at line 55
static contactReference()

Ajax callback for custom fields of type ContactReference

Todo: Migrate contact reference fields to use EntityRef

at line 164
static getPCPList()

Fetch PCP ID by PCP Supporter sort_name, also displays PCP title and associated Contribution Page title

at line 228
static relationship()

at line 288
static customField()

Fetch the custom field help.

at line 298
static groupTree()

at line 308
static deleteCustomValue()

Delete custom value.

at line 325
static checkUserName()

check the CMS username.

at line 364
static getContactEmail()

Function to get email address of a contact.

at line 474
static getContactPhone()

at line 535
static buildSubTypes()

at line 557
static buildDedupeRules()

at line 582
static dashboard()

Function used for CiviCRM dashboard operations.

at line 599
static getSignature()

Retrieve signature based on email id.

at line 618
static processDupes()

Process dupes.

at line 635
static getDedupes()

Retrieve list of duplicate pairs from cache table.

at line 846
static array getSearchOptionsFromRequest()

Get the searchable options from the request.

Return Value

array

at line 892
static bool isOrQuery()

Is the query an OR query.

If a generic search value is passed in - ie. $_REQUEST['search']['value'] = 'abc' then all fields are searched for this.

It is unclear if there is any code that still passes this in or whether is is just legacy. It could cause a server-killing query on a large site so it probably is NOT in use if we haven't had complaints.

Return Value

bool

at line 911
static CRM_Core_DAO|mixed|null markNonDuplicates(int $cid, int $oid, "dupe-nondupe|nondupe-dupe" $oper)

Mark not duplicates.

Note this function would sensibly be replaced by an api-call but extracting here to add a test first.

I would have like to make it private but test class accesses it & it doesn't warrant being a BAO class as it should feel very endangered.

Parameters

int $cid
int $oid
"dupe-nondupe|nondupe-dupe" $oper

Return Value

CRM_Core_DAO|mixed|null

at line 942
pdfFormat()

Retrieve a PDF Page Format for the PDF Letter form.

at line 953
static paperSize()

Retrieve Paper Size dimensions.

at line 966
static flipDupePairs(int $prevNextId = NULL)

Swap contacts in a dupe pair i.e main with duplicate contact.

Parameters

int $prevNextId

at line 987
static selectUnselectContacts()

Used to store selected contacts across multiple pages in advanced search.

at line 1028
static string _convertToId(string $name)

Parameters

string $name

Return Value

string

at line 1035
static getAddressDisplay()

at line 1054
static toggleDedupeSelect()

Mark dupe pairs as selected from un-selected state or vice-versa, in dupe cache table.

at line 1087
static getContactRelationships()

Retrieve contact relationships.