Helper class with functions to assist in working with Contacts module information
Definition at line 42 of file ContactsUtil.php.
static getStartingStateOrder | ( | array $ | states | ) | [static] |
Given an array of states, determine what the startingState order number is.
Definition at line 49 of file ContactsUtil.php.
static getStartingState | ( | ) | [static] |
Definition at line 68 of file ContactsUtil.php.
static getStartingStateId | ( | ) | [static] |
Definition at line 77 of file ContactsUtil.php.
static getContactStateDataKeyedByOrder | ( | ) | [static] |
Get an array of order/name pairings of the existing contact states ordered by order.
Definition at line 87 of file ContactsUtil.php.
static getContactStateLabelsKeyedByLanguageAndOrder | ( | ) | [static] |
Get an array of order/ label translation array pairings of the existing contact states ordered by order.
Definition at line 102 of file ContactsUtil.php.
static getContactStateDataKeyedById | ( | ) | [static] |
Get an array of order/name pairings of the existing contact states ordered by order.
Definition at line 124 of file ContactsUtil.php.
static getContactStateDataFromStartingStateOnAndKeyedById | ( | ) | [static] |
Get an array of only the states from the starting state onwards, id/name pairings of the existing contact states ordered by order.
Definition at line 140 of file ContactsUtil.php.
static getContactStateDataFromStartingStateKeyedByIdAndLabelByLanguage | ( | $ | language | ) | [static] |
Get an array of only the states from the starting state onwards, id/translated label pairings of the existing contact states ordered by order.
string | language |
Definition at line 166 of file ContactsUtil.php.
static getAllContactStatesDataFromStartingStateKeyedByIdAndLabelByLanguage | ( | $ | language | ) | [static] |
Get an array of only the states from the starting state onwards, id/translated label pairings of the existing contact states ordered by order.
string | language |
Definition at line 193 of file ContactsUtil.php.
static getContactStateDataFromStartingStateLabelByLanguage | ( | $ | language | ) | [static] |
Get an array of states from the starting state onwards, id/translated label pairings of the existing contact states ordered by order.
Definition at line 210 of file ContactsUtil.php.
static setStartingStateById | ( | $ | startingStateId | ) | [static] |
int | $startingStateId |
Definition at line 236 of file ContactsUtil.php.
static setStartingStateByOrder | ( | $ | startingStateOrder | ) | [static] |
$startingStateOrder |
NotSupportedException |
Definition at line 248 of file ContactsUtil.php.
static resolveContactStateAdapterByModulesUserHasAccessTo | ( | $ | moduleClassNameFirstStates, | |
$ | moduleClassNameLaterStates, | |||
$ | user | |||
) | [static] |
Given two module class names and a user, resolve based on the user's access what if any adapter should be utilized. If the user has access to both modules, then return null. If the user has access to none of the modules, then return false. Otherwise return a string with the name of the appropriate adapter to use.
string | $moduleClassNameFirstStates | |
string | $moduleClassNameLaterStates | |
object | $user User model |
Definition at line 271 of file ContactsUtil.php.
static resolveStateLabelByLanguage | ( | ContactState $ | state, | |
$ | language | |||
) | [static] |
Given a CustomFieldData object, return an array of data and translated labels indexed by the data name.
CustomFieldData | $customFieldData $param string $language |
Definition at line 305 of file ContactsUtil.php.
static resolveAddressesFromRelatedAccount | ( | Contact &$ | contact | ) | [static] |
Given a contact with a related account, set the contact address information from the account address information
Contact | $contact |
Definition at line 316 of file ContactsUtil.php.
static renderHtmlContentLabelFromContactAndKeyword | ( | $ | contact, | |
$ | keyword | |||
) | [static] |
Given a contact model and a keyword, render the strval of the contact and the matched email address that the keyword matches. If the keyword does not match any email addresses on the contact, render the primary email if it exists. Otherwise just render the strval contact.
object | $contact - model | |
string | $keyword |
Definition at line 344 of file ContactsUtil.php.
static resolveMarketingListMembersByContact | ( | $ | contact | ) | [static] |
$contact | Contact::beforeDelete() resolves associated marketingListMembers, cascades deletion |
Definition at line 371 of file ContactsUtil.php.
static resolveCompanyNameForRelatedAccountName | ( | Contact $ | contact | ) | [static] |
If contact is lead then just return companyName field If contact is contact and do not have related account, return company name If contact is contact and have related account, return account name
Contact | $contact |
Definition at line 390 of file ContactsUtil.php.