Documentation

CrmInterface extends CrmLibrary
in package

This is the crmInterface class file for handling the all functionalities under interface menu.

Tags
category

CrmInterface

subpackage

module_crm

author

ss4ugroup ss4ugroup@softsolutions4u.com

version
1.0.0
link
www.cloudrexx.com

Table of Contents

Constants

MiB2  = 2097152
constant MiB2 2megabytes
SOCIAL_NETWORK_BLOGGER  = 8
SOCIAL_NETWORK_FACEBOOK  = 4
SOCIAL_NETWORK_GMAIL  = 7
SOCIAL_NETWORK_ICQ  = 11
SOCIAL_NETWORK_LINKEDIN  = 3
SOCIAL_NETWORK_LIVEJOURNAL  = 5
SOCIAL_NETWORK_MYSPACE  = 6
SOCIAL_NETWORK_NONE  = 0
SOCIAL_NETWORK_SKYPE  = 1
SOCIAL_NETWORK_TWITTER  = 2
SOCIAL_NETWORK_XING  = 15

Properties

$_arrLanguages  : array<string|int, mixed>
All Languages take it as array
$_arrSettings  : array<string|int, mixed>
Settings value stored in array
$_csvSeparator  : string
Csv seperator
$_memberShips  : array<string|int, mixed>
All Memberships take it as array
$_objTpl  : object
Template object
$_statusMessage  : string
Status message
$_strErrMessage  : string
Status Error message
$_strOkMessage  : string
Status Ok message
$_strWarMessage  : string
Status Warning message
$addressTypes  : array<string|int, mixed>
Address Types
$addressValues  : array<string|int, mixed>
Address Values
$adminAccessId  : int
Admin Access Id
$countries  : array<string|int, mixed>
All Countries name take it as array
$customerAccessId  : int
Customer Access Id
$customerTypes  : array<string|int, mixed>
All customer types take it as array
$emailOptions  : array<string|int, mixed>
Email Options
$moduleName  : string
Module Name
$moduleNameLC  : string
Module Name in lower case
$phoneOptions  : array<string|int, mixed>
Phone Options
$supportCaseStatus  : array<string|int, mixed>
Support Case Status
$websiteOptions  : array<string|int, mixed>
Website Options
$websiteProfileOptions  : array<string|int, mixed>
Website Profile Options
$contact  : mixed
$instance  : object
Class Object
$load  : object
object for loading class
$memoryLimit  : int
$model_industry_types  : mixed
$socialProfileOptions  : array<string|int, mixed>
Social Profile Options
$_delimiter  : array<string|int, mixed>
delimiter
$_enclosure  : array<string|int, mixed>
enclosure
$_mediaPath  : string
media path

Methods

__construct()  : mixed
php 5.3 contructor
_escapeCsvValue()  : string
Escape a value that it could be inserted into a csv file.
_getDomainNameId()  : int
Get Domain name Id
_getResourceDropDown()  : null
Populates the Cloudrexx user Filter Drop Down
_initCrmModule()  : mixed
Registers all css and js to be loaded for crm module
_usortByMultipleKeys()  : int
Usort for multiple key values
activateCompanySize()  : null
Activate / Deactivate company size status
addCrmContact()  : null
Adding Crm Contact
addCrmContactFromAccessUser()  : int
Create a CRM contact based on an object of \User
addUser()  : bool
Add User in the time of adding a customer based on the account settings
checkContactExists()  : int
Check Contact exists or not
checkRecordStoreTODB()  : null
Check the argument and save the field values to corresponding DB
countEntries()  : int
Counts all existing entries in the database.
countEntriesOfJoin()  : int
Counts all existing entries in the database.
countRecordEntries()  : int
get the count of entries
createLanguageArray()  : array<string|int, mixed>
Creates an array containing all frontend-languages. Example: $arrValue[$langId]['short'] or $arrValue[$langId]['long']
createThumbnailOfImage()  : string
Create thumbnail of image
csvExport()  : all
Export all contacts in csv format
csvImport()  : csvdata
used to fetch the csv data
deleteCompanySize()  : null
Delete company size
deleteDeal()  : null
Delete Deal record
deleteDeals()  : null
Delete Multiple Deals
deleteIndustryType()  : null
Delete Industry type
deleteMembership()  : null
delete Membership
deleteStage()  : null
Delete stage record
formattedWebsite()  : string
Formatting the website
getActiveEmailTemLangId()  : array<string|int, mixed>
get the available email template lang ids
getCompanySizeDropDown()  : null
Get Company Size Dropdown From DB
getCompanySizeNameById()  : string
Get company size name by id
getContactAddressCountry()  : mixed
Get the contact Address Country value From DB
getContactAddrTypeCountry()  : null
Get Contact Address Type Country value
getContactsQuery()  : mixed
getCountry()  : array<string|int, mixed>
Get Country value from DB
getCrmDatasource()  : string
Get Crm data Source
getCsvRecord()  : null
Get the CSV Record
getCurrencyIdByContactId()  : int
Get ID of the currency assigned to a contact
getCurrencyIdByName()  : int
Get currency id by name
getCustomerCurrencyDropDown()  : null
Get Customer's Currency Dropdown From DB
getCustomerIdByName()  : int
Get Customer Id ny name
getCustomerTypeDropDown()  : null
Get Customertype Dropdown From DB
getCustomerTypeIdByName()  : int
Get Customer Type id by name
getCustomerTypeNameById()  : string
Get customer type name by id
getCustomerTypes()  : int
Get Customer Types From DB
getDatasourceDropDown()  : null
Get Data source Dropdown
getDealsStages()  : null
Get Deals Stages
getDefaultCurrencyId()  : int
Get default currencyId
getEmail()  : string
Get username
getEmailTempLang()  : int
get the email template lang id for sending mail
getExistCrmDetail()  : array<string|int, mixed>
get exist crm account detail
getImportOptions()  : array<string|int, mixed>
Export all fields can be imported
getIndustryTypeDropDown()  : null
Get Industry Type Dropdown From DB
getIndustryTypeIdByName()  : int
Get industry type id by name
getIndustryTypeNameById()  : string
Get industry type name by id
getLanguageIdByName()  : int
Get Language Id ny name
getMembershipDropdown()  : null
Get Membership dropdown
getMemberships()  : array<string|int, mixed>
Get Membership details From DB
getModifyTaskTypes()  : null
Get Modify Task type values From DB
getOverviewMembershipDropdown()  : null
Get membership dropdown for overview page
getPagingLimit()  : int
Returns the allowed maximum element per page. Can be used for paging.
getResources()  : bool
Get Resource data's
getSettings()  : array<string|int, mixed>
Get the Settings value from the DB
getUserIdByCrmUserId()  : int|null
Checks whether the crm customer is connected with a user account
getUserName()  : string
Get username
init()  : object
Initialize a class
initUploader()  : null
Inits the uploader when displaying a contact form.
listIndustryTypes()  : string
List the industry types
makeLinksInTheContent()  : string
Make the url string's into clickable link's.
notifyStaffOnContactAccModification()  : null
notify the staffs regarding the account modification of a contact
parseContacts()  : array<string|int, mixed>
Parse the contacts
parseLetterIndexList()  : mixed
saveCsvData()  : Save
Save the data into crm
saveSortingCompanySize()  : null
Save the sorting
saveSortingIndustryType()  : null
Industry type sorting function
saveSortingMembership()  : null
Membership Sorting functionality
saveStageSorting()  : null
save sorting stage
saveTaskTypes()  : null
Save Task Type values to DB
setContactPersonProfile()  : mixed
Adding Crm Contact and link it with crm company if possible
showExport()  : customer
It displayes the import menu
showImport()  : customer
It displayes the import menu
showTaskTypes()  : null
Show all the Task Types
taskTypeDropDown()  : null
Get Tasktype Dropdown
toggleIndustryType()  : void
Industry type Change Status
toggleMembership()  : void
Change Membership Status
toggleStage()  : void
change stage status
unlinkContact()  : null
Unlink the contact
updateCustomerContacts()  : null
Update Customer Contacts
updateCustomerMemberships()  : null
Update Customer Memberships
validateCustomer()  : bool
Validate the Customer
checkMemoryLimit()  : bool
This method checks the required memory is available for the import process if not then it will try to increase the memory limit.
createThumbnailOfPicture()  : string
Create thumbnail of image
getTaskPermission()  : bool
Returns true or false for task edit and delete permission
getTemporaryUploadPath()  : array<string|int, mixed>
Gets the temporary upload location for files.
moveUploadedImageInToPlace()  : string
Move uploaded image into respective folder
sendCsvImportResponse()  : mixed
Send a response for csv import

Constants

Properties

$_arrLanguages

All Languages take it as array

public array<string|int, mixed> $_arrLanguages = array()
Tags
access

public

$_arrSettings

Settings value stored in array

public array<string|int, mixed> $_arrSettings = array()
Tags
access

public

$_csvSeparator

Csv seperator

public string $_csvSeparator = ';'
Tags
access

private

$_memberShips

All Memberships take it as array

public array<string|int, mixed> $_memberShips = array()
Tags
access

public

$_statusMessage

Status message

public string $_statusMessage = ''
Tags
access

private

$_strErrMessage

Status Error message

public string $_strErrMessage = ''
Tags
access

private

$_strOkMessage

Status Ok message

public string $_strOkMessage = ''
Tags
access

private

$_strWarMessage

Status Warning message

public string $_strWarMessage = ''
Tags
access

private

$addressTypes

Address Types

public array<string|int, mixed> $addressTypes = array("TXT_CRM_HOME", "TXT_CRM_DELIVERY", "TXT_CRM_OFFICE", "TXT_CRM_BILLING", "TXT_CRM_OTHERS", "TXT_CRM_WORK")
Tags
access

public

$addressValues

Address Values

public array<string|int, mixed> $addressValues = array("", array('label' => 'address', 'lang_variable' => "TXT_CRM_ADDRESS"), array('label' => 'city', 'lang_variable' => "TXT_CRM_CITY"), array('label' => 'state', 'lang_variable' => "TXT_CRM_STATE"), array('label' => 'zip', 'lang_variable' => "TXT_CRM_ZIP"), array('label' => 'country', 'lang_variable' => "TXT_CRM_COUNTRY"), "type")
Tags
access

public

$adminAccessId

Admin Access Id

public int $adminAccessId = 195
Tags
access

public

$countries

All Countries name take it as array

public array<string|int, mixed> $countries = array()
Tags
access

public

$customerAccessId

Customer Access Id

public int $customerAccessId = 194
Tags
access

public

$customerTypes

All customer types take it as array

public array<string|int, mixed> $customerTypes = array()
Tags
access

public

$emailOptions

Email Options

public array<string|int, mixed> $emailOptions = array("TXT_CRM_HOME", "TXT_CRM_WORK", "TXT_CRM_OTHERS")
Tags
access

public

$moduleName

Module Name

public string $moduleName = ''
Tags
access

private

$moduleNameLC

Module Name in lower case

public string $moduleNameLC = ''
Tags
access

private

$phoneOptions

Phone Options

public array<string|int, mixed> $phoneOptions = array("TXT_CRM_HOME", "TXT_CRM_WORK", "TXT_CRM_MOBILE", "TXT_CRM_FAX", "TXT_CRM_DIRECT", "TXT_CRM_OTHERS")
Tags
access

public

$supportCaseStatus

Support Case Status

public array<string|int, mixed> $supportCaseStatus = array(0 => 'Open', 1 => 'Pending', 2 => 'Closed')
Tags
access

private

$websiteOptions

Website Options

public array<string|int, mixed> $websiteOptions = array("TXT_CRM_HOME", "TXT_CRM_WORK", "TXT_CRM_BUSINESS1", "TXT_CRM_BUSINESS2", "TXT_CRM_BUSINESS3", "TXT_CRM_PRIVATE", "TXT_CRM_OTHERS")
Tags
access

public

$websiteProfileOptions

Website Profile Options

public array<string|int, mixed> $websiteProfileOptions = array("TXT_CRM_HOME", "TXT_CRM_WORK", "TXT_CRM_OTHERS", "TXT_CRM_BUSINESS1", "TXT_CRM_BUSINESS2", "TXT_CRM_BUSINESS3")
Tags
access

public

$instance

Class Object

protected static object $instance
Tags
access

protected

$load

object for loading class

protected object $load
Tags
access

protected

$socialProfileOptions

Social Profile Options

protected array<string|int, mixed> $socialProfileOptions = array(self::SOCIAL_NETWORK_NONE => '', self::SOCIAL_NETWORK_SKYPE => 'TXT_CRM_SKYPE', self::SOCIAL_NETWORK_TWITTER => 'TXT_CRM_TWITTER', self::SOCIAL_NETWORK_LINKEDIN => 'TXT_CRM_LINKEDIN', self::SOCIAL_NETWORK_FACEBOOK => 'TXT_CRM_FACEBOOK', self::SOCIAL_NETWORK_LIVEJOURNAL => 'TXT_CRM_LIVEJOURNAL', self::SOCIAL_NETWORK_MYSPACE => 'TXT_CRM_MYSPACE', self::SOCIAL_NETWORK_GMAIL => 'TXT_CRM_GMAIL', self::SOCIAL_NETWORK_BLOGGER => 'TXT_CRM_BLOGGER', self::SOCIAL_NETWORK_ICQ => 'TXT_CRM_ICQ', self::SOCIAL_NETWORK_XING => 'TXT_CRM_XING')

$_delimiter

delimiter

private array<string|int, mixed> $_delimiter = array(array('title' => 'Semicolon', 'value' => ';', 'placeholder' => 'TXT_CRM_SEMICOLON'), array('title' => 'Comma', 'value' => ',', 'placeholder' => 'TXT_CRM_COMMA'), array('title' => 'Colon', 'value' => ':', 'placeholder' => 'TXT_CRM_COLON'))
Tags
access

private

$_enclosure

enclosure

private array<string|int, mixed> $_enclosure = array(array('title' => 'Double quote', 'value' => '"', 'placeholder' => 'TXT_CRM_DOUBLE_QUOTE'), array('title' => 'Single quote', 'value' => "'", 'placeholder' => 'TXT_CRM_SINGLE_QUOTE'))
Tags
access

private

Methods

__construct()

php 5.3 contructor

public __construct(object $objTpl, mixed $name) : mixed
Parameters
$objTpl : object

template object

$name : mixed

_escapeCsvValue()

Escape a value that it could be inserted into a csv file.

public _escapeCsvValue(string $value) : string
Parameters
$value : string
Return values
string

_getDomainNameId()

Get Domain name Id

public _getDomainNameId(int $websiteId, int $cusId, string $domainName) : int
Parameters
$websiteId : int

website id

$cusId : int

customer id

$domainName : string

domain name

Tags
global

ADO Connection $objDatabase

Return values
int

_getResourceDropDown()

Populates the Cloudrexx user Filter Drop Down

public _getResourceDropDown([string $block = 'members' ][, int $selectedId = 0 ][, int $groupId = 0 ]) : null
Parameters
$block : string = 'members'

The name of the template block to parse

$selectedId : int = 0

The ID of the selected user

$groupId : int = 0

Resource froup id

Return values
null

_initCrmModule()

Registers all css and js to be loaded for crm module

public _initCrmModule() : mixed

_usortByMultipleKeys()

Usort for multiple key values

public _usortByMultipleKeys(int $key[, string $direction = SORT_ASC ]) : int
Parameters
$key : int

key values

$direction : string = SORT_ASC

sorting order

Return values
int

activateCompanySize()

Activate / Deactivate company size status

public activateCompanySize(mixed $entries[, bool $deactivate = false ]) : null
Parameters
$entries : mixed

company size id

$deactivate : bool = false
Tags
global

ADO Connection $objDatabase

global

Array $_ARRAYLANG

Return values
null

addCrmContact()

Adding Crm Contact

public addCrmContact([array<string|int, mixed> $arrFormData = array() ]) : null
Parameters
$arrFormData : array<string|int, mixed> = array()

form data's

Return values
null

addCrmContactFromAccessUser()

Create a CRM contact based on an object of \User

public static addCrmContactFromAccessUser(User $user) : int
Parameters
$user : User
Return values
int

The ID of the newly created CRM contact

addUser()

Add User in the time of adding a customer based on the account settings

public addUser(string $email, string $password[, bool $sendLoginDetails = false ][, mixed $result = array() ][, mixed $id = null ]) : bool
Parameters
$email : string

user email id

$password : string

user password

$sendLoginDetails : bool = false

status

$result : mixed = array()
$id : mixed = null
Return values
bool

checkContactExists()

Check Contact exists or not

public checkContactExists(string $customer_name, string $family_name, string $emails, int $contact_type) : int
Parameters
$customer_name : string

customer name

$family_name : string

family name

$emails : string

email ids

$contact_type : int

Contact type

Return values
int

checkRecordStoreTODB()

Check the argument and save the field values to corresponding DB

public checkRecordStoreTODB([string $tableName = '' ][, array<string|int, mixed> $values = array() ][, array<string|int, mixed> $fields = array() ]) : null
Parameters
$tableName : string = ''

Table name

$values : array<string|int, mixed> = array()

Conditions

$fields : array<string|int, mixed> = array()

Field values

Return values
null

countEntries()

Counts all existing entries in the database.

public countEntries(string $table[, string $where = null ]) : int
Parameters
$table : string

table name

$where : string = null

condition

Tags
global

ADONewConnection

Return values
int

number of entries in the database

countEntriesOfJoin()

Counts all existing entries in the database.

public countEntriesOfJoin(string $table) : int
Parameters
$table : string

table name

Tags
global

ADONewConnection

Return values
int

number of entries in the database

countRecordEntries()

get the count of entries

public countRecordEntries(string $query) : int
Parameters
$query : string
Return values
int

createLanguageArray()

Creates an array containing all frontend-languages. Example: $arrValue[$langId]['short'] or $arrValue[$langId]['long']

public createLanguageArray() : array<string|int, mixed>
Return values
array<string|int, mixed>

$arrReturn

createThumbnailOfImage()

Create thumbnail of image

public static createThumbnailOfImage(string $imageName[, bool $profilePic = false ]) : string
Parameters
$imageName : string
$profilePic : bool = false
Return values
string

csvExport()

Export all contacts in csv format

public csvExport() : all
Tags
global

array $_ARRAYLANG

global

object $objDatabase

global

integer $_LANGID

Return values
all

contacts in csv format

csvImport()

used to fetch the csv data

public csvImport() : csvdata
Return values
csvdata

deleteCompanySize()

Delete company size

public deleteCompanySize(mixed $companySizeId) : null
Parameters
$companySizeId : mixed

companySizeId is either integer or array.

Tags
global

ADO Connection $objDatabase

Return values
null

deleteDeal()

Delete Deal record

public deleteDeal() : null
Tags
global

ADO Connection $objDatabase

Return values
null

deleteDeals()

Delete Multiple Deals

public deleteDeals(array<string|int, mixed> $dealsEntries) : null
Parameters
$dealsEntries : array<string|int, mixed>

entry ids

Tags
global

ADO Connection $objDatabase

Return values
null

deleteIndustryType()

Delete Industry type

public deleteIndustryType() : null
Tags
global

ADO Connection $objDatabase

Return values
null

deleteMembership()

delete Membership

public deleteMembership() : null
Tags
global

ADO Connection $objDatabase

Return values
null

deleteStage()

Delete stage record

public deleteStage() : null
Tags
global

ADO Connection $objDatabase

Return values
null

formattedWebsite()

Formatting the website

public formattedWebsite([string $url = '' ][, int $urlProfile = 0 ]) : string
Parameters
$url : string = ''
$urlProfile : int = 0
Return values
string

getActiveEmailTemLangId()

get the available email template lang ids

public getActiveEmailTemLangId([string $section = 'Crm' ][, string $key = '' ]) : array<string|int, mixed>
Parameters
$section : string = 'Crm'

mail template section name

$key : string = ''

mail template key value

Return values
array<string|int, mixed>

getCompanySizeDropDown()

Get Company Size Dropdown From DB

public getCompanySizeDropDown(mixed $objTpl[, int $selectedId = 0 ][, string $block = 'companySize' ]) : null
Parameters
$objTpl : mixed
$selectedId : int = 0
$block : string = 'companySize'
Tags
global

ADO Connection $objDatabase

Return values
null

getCompanySizeNameById()

Get company size name by id

public getCompanySizeNameById(int $companySizeId) : string
Parameters
$companySizeId : int
Return values
string

name of the company size

getContactAddressCountry()

Get the contact Address Country value From DB

public getContactAddressCountry(mixed $objTpl, int $selectedCountry[, string $block = "crmCountry" ]) : mixed
Parameters
$objTpl : mixed
$selectedCountry : int
$block : string = "crmCountry"
Tags
todo

$selectedCountry must be converted into an integer. See CLX-3968

getContactAddrTypeCountry()

Get Contact Address Type Country value

public getContactAddrTypeCountry(mixed $objTpl, int $selectedType[, string $block = "addressType" ]) : null
Parameters
$objTpl : mixed
$selectedType : int
$block : string = "addressType"
Tags
global

Array $_ARRAYLANG

Return values
null

getContactsQuery()

public getContactsQuery([mixed $filter = array() ][, mixed $sortField = 'c.id' ][, mixed $sortOrder = 0 ]) : mixed
Parameters
$filter : mixed = array()
$sortField : mixed = 'c.id'
$sortOrder : mixed = 0

getCountry()

Get Country value from DB

public getCountry() : array<string|int, mixed>
Tags
global

ADO Connection $objDatabase

Return values
array<string|int, mixed>

getCrmDatasource()

Get Crm data Source

public getCrmDatasource() : string
Tags
global

ADO Connection $objDatabase

Return values
string

getCsvRecord()

Get the CSV Record

public getCsvRecord() : null
Return values
null

getCurrencyIdByContactId()

Get ID of the currency assigned to a contact

public static getCurrencyIdByContactId(int $contactId[, bool $companyFallback = true ]) : int

Fetches the ID of the Currency assigned to CrmContact identified by $contactId. If selected CrmContact is of type CrmContact::TYPE_PERSON and has a company assigned (through CrmContact::$contact_customer), then that Currency (its ID) will be returned instead.

Parameters
$contactId : int

ID of CrmContact

$companyFallback : bool = true

Set this to false to not lookup the Currency of an assinged company (through CrmContact::$contact_customer) in case CrmContact is of type CrmContact::TYPE_PERSON.

Return values
int

Id of assigned Currency or 0 if $crmId is not a valid ID of a company or person.

getCurrencyIdByName()

Get currency id by name

public getCurrencyIdByName(string $currency) : int
Parameters
$currency : string

currency name

Return values
int

getCustomerCurrencyDropDown()

Get Customer's Currency Dropdown From DB

public getCustomerCurrencyDropDown(mixed $objTpl[, int $selectedId = 0 ][, string $block = "currency" ]) : null
Parameters
$objTpl : mixed
$selectedId : int = 0
$block : string = "currency"
Tags
global

Array $_ARRAYLANG

global

ADO Connection $objDatabase

Return values
null

getCustomerIdByName()

Get Customer Id ny name

public getCustomerIdByName(string $company) : int
Parameters
$company : string

Company name

Return values
int

getCustomerTypeDropDown()

Get Customertype Dropdown From DB

public getCustomerTypeDropDown(object $objTpl[, int $selectedId = 0 ][, string $block = "customerTypes" ][, array<string|int, mixed> $options = array() ]) : null
Parameters
$objTpl : object
$selectedId : int = 0
$block : string = "customerTypes"
$options : array<string|int, mixed> = array()
Tags
global

Array $_ARRAYLANG

Return values
null

getCustomerTypeIdByName()

Get Customer Type id by name

public getCustomerTypeIdByName(string $customerType) : int
Parameters
$customerType : string

customertype name

Return values
int

getCustomerTypeNameById()

Get customer type name by id

public getCustomerTypeNameById(int $customerTypeId) : string
Parameters
$customerTypeId : int

customer type id

Return values
string

name of the customer type

getCustomerTypes()

Get Customer Types From DB

public getCustomerTypes() : int
Tags
global

ADO Connection $objDatabase

Return values
int

getDatasourceDropDown()

Get Data source Dropdown

public getDatasourceDropDown(mixed $objTpl[, string $block = 'datasource' ][, int $selectedId = 0 ]) : null
Parameters
$objTpl : mixed
$block : string = 'datasource'

block name

$selectedId : int = 0

Default value id

Return values
null

getDealsStages()

Get Deals Stages

public getDealsStages([int $selectedStage = 0 ][, string $block = "dealsStages" ]) : null
Parameters
$selectedStage : int = 0
$block : string = "dealsStages"
Tags
global

ADO Connection $objDatabase

Return values
null

getDefaultCurrencyId()

Get default currencyId

public static getDefaultCurrencyId() : int
Return values
int

defaultCurrencyId

getEmail()

Get username

public getEmail(int $userId) : string
Parameters
$userId : int
Return values
string

getEmailTempLang()

get the email template lang id for sending mail

public getEmailTempLang([array<string|int, mixed> $availableEmailTemp = array() ][, string $email = '' ]) : int
Parameters
$availableEmailTemp : array<string|int, mixed> = array()

available email template ids

$email : string = ''

recipient email id

Return values
int

getExistCrmDetail()

get exist crm account detail

public getExistCrmDetail(int $id) : array<string|int, mixed>
Parameters
$id : int
Return values
array<string|int, mixed>

getImportOptions()

Export all fields can be imported

public getImportOptions() : array<string|int, mixed>
Tags
global

array $_ARRAYLANG

Return values
array<string|int, mixed>

return all the import field options

getIndustryTypeDropDown()

Get Industry Type Dropdown From DB

public getIndustryTypeDropDown(object $objTpl[, int $selectedId = 0 ][, string $block = "industryType" ]) : null
Parameters
$objTpl : object
$selectedId : int = 0
$block : string = "industryType"
Tags
global

Array $_ARRAYLANG

global

ADO Connection $objDatabase

global

Array $_LANGID

Return values
null

getIndustryTypeIdByName()

Get industry type id by name

public getIndustryTypeIdByName(string $industrytype) : int
Parameters
$industrytype : string

industry type name

Return values
int

getIndustryTypeNameById()

Get industry type name by id

public getIndustryTypeNameById(int $industryId) : string
Parameters
$industryId : int

industry type id

Return values
string

name of the industry type

getLanguageIdByName()

Get Language Id ny name

public getLanguageIdByName(string $language) : int
Parameters
$language : string

Language name

Return values
int

getMembershipDropdown()

Get Membership dropdown

public getMembershipDropdown(mixed $objTpl, array<string|int, mixed> $memberShips[, string $block = "assignedGroup" ][, array<string|int, mixed> $selected = array() ]) : null
Parameters
$objTpl : mixed
$memberShips : array<string|int, mixed>

membership ids

$block : string = "assignedGroup"

Block name

$selected : array<string|int, mixed> = array()

Default membership ids

Return values
null

getMemberships()

Get Membership details From DB

public getMemberships([bool $active = true ]) : array<string|int, mixed>
Parameters
$active : bool = true

membership status

Tags
global

ADO Connection $objDatabase

global

Array $_LANGID

Return values
array<string|int, mixed>

getModifyTaskTypes()

Get Modify Task type values From DB

public getModifyTaskTypes([int $id = 0 ]) : null
Parameters
$id : int = 0

Task type id

Tags
global

ADO Connection $objDatabase

global

Array $_ARRAYLANG

Return values
null

getOverviewMembershipDropdown()

Get membership dropdown for overview page

public getOverviewMembershipDropdown(mixed $objTpl, object $modelMembership[, int $selected = array() ][, string $block = "memberships" ][, array<string|int, mixed> $options = array() ]) : null
Parameters
$objTpl : mixed
$modelMembership : object
$selected : int = array()
$block : string = "memberships"
$options : array<string|int, mixed> = array()
Return values
null

getPagingLimit()

Returns the allowed maximum element per page. Can be used for paging.

public getPagingLimit() : int
Tags
global

array

Return values
int

allowed maximum of elements per page.

getResources()

Get Resource data's

public getResources(int $groupId) : bool
Parameters
$groupId : int

resource group id

Tags
global

ADO Connection $objDatabase

Return values
bool

getSettings()

Get the Settings value from the DB

public getSettings() : array<string|int, mixed>
Tags
global

ADO Connection $objDatabase

Return values
array<string|int, mixed>

Setting values

getUserIdByCrmUserId()

Checks whether the crm customer is connected with a user account

public static getUserIdByCrmUserId(mixed $crmId) : int|null
Parameters
$crmId : mixed
Return values
int|null

user_account of crm user

getUserName()

Get username

public getUserName(int $userId) : string
Parameters
$userId : int
Return values
string

init()

Initialize a class

public static init() : object
Return values
object

initUploader()

Inits the uploader when displaying a contact form.

public initUploader(string $callBackFun, string $callBackJs, array<string|int, mixed> $data, string $buttonText[, array<string|int, mixed> $options = array() ]) : null
Parameters
$callBackFun : string
$callBackJs : string
$data : array<string|int, mixed>
$buttonText : string
$options : array<string|int, mixed> = array()
Return values
null

listIndustryTypes()

List the industry types

public listIndustryTypes(mixed $objTpl, int $intView[, int $intIndustryId = null ][, array<string|int, mixed> $arrParentIds = null ]) : string
Parameters
$objTpl : mixed
$intView : int
$intIndustryId : int = null

industry id

$arrParentIds : array<string|int, mixed> = null

parent ids

Tags
global

Array $_ARRAYLANG

global

ADO Connection $objDatabase

Return values
string

makeLinksInTheContent()

Make the url string's into clickable link's.

public makeLinksInTheContent(string $html) : string

Example:

http://www.cloudrexx.com

will be

http://www.cloudrexx.com

Parameters
$html : string
Return values
string

$html

notifyStaffOnContactAccModification()

notify the staffs regarding the account modification of a contact

public notifyStaffOnContactAccModification([int $customerId = 0 ][, string $first_name = '' ][, string $last_name = '' ][, mixed $gender = 0 ]) : null
Parameters
$customerId : int = 0

customer id

$first_name : string = ''

customer first name

$last_name : string = ''

customer last name

$gender : mixed = 0
Tags
access

public

global

object $objTemplate

global

array $_ARRAYLANG

Return values
null

parseContacts()

Parse the contacts

public parseContacts(array<string|int, mixed> $input) : array<string|int, mixed>
Parameters
$input : array<string|int, mixed>

input value

Return values
array<string|int, mixed>

parseLetterIndexList()

public parseLetterIndexList(string $URI, string $paramName, string $selectedLetter) : mixed
Parameters
$URI : string

url

$paramName : string

parameter name

$selectedLetter : string

Selected letter

Tags
global

array $_CORELANG

saveCsvData()

Save the data into crm

public saveCsvData() : Save
Tags
global

array $_ARRAYLANG

Return values
Save

the data into crm

saveSortingCompanySize()

Save the sorting

public saveSortingCompanySize(array<string|int, mixed> $entriesSorting) : null
Parameters
$entriesSorting : array<string|int, mixed>

sorting values.

Tags
global

ADO Connection $objDatabase

global

Array $_ARRAYLANG

Return values
null

saveSortingIndustryType()

Industry type sorting function

public saveSortingIndustryType(array<string|int, mixed> $industryEntrySorting) : null
Parameters
$industryEntrySorting : array<string|int, mixed>

entries id

Tags
global

ADO Connection $objDatabase

global

Array $_ARRAYLANG

Return values
null

saveSortingMembership()

Membership Sorting functionality

public saveSortingMembership(array<string|int, mixed> $entriesSorting) : null
Parameters
$entriesSorting : array<string|int, mixed>

entries ids

Tags
global

ADO Connection $objDatabase

global

Array $_ARRAYLANG

Return values
null

saveStageSorting()

save sorting stage

public saveStageSorting(array<string|int, mixed> $successEntrySorting) : null
Parameters
$successEntrySorting : array<string|int, mixed>

entry ids

Tags
global

ADO Connection $objDatabase

global

Array $_ARRAYLANG

Return values
null

saveTaskTypes()

Save Task Type values to DB

public saveTaskTypes([int $id = 0 ]) : null
Parameters
$id : int = 0

task type id

Tags
global

ADO Connection $objDatabase

Return values
null

setContactPersonProfile()

Adding Crm Contact and link it with crm company if possible

public setContactPersonProfile([array<string|int, mixed> $arrFormData = array() ][, int $userAccountId = 0 ][, int $frontendLanguage = null ]) : mixed
Parameters
$arrFormData : array<string|int, mixed> = array()

form data's

$userAccountId : int = 0
$frontendLanguage : int = null
Tags
global

$objDatabase

global

int $_LANGID

showExport()

It displayes the import menu

public showExport() : customer
Return values
customer

import screen

showImport()

It displayes the import menu

public showImport() : customer
Return values
customer

import screen

showTaskTypes()

Show all the Task Types

public showTaskTypes() : null
Tags
global

Array $_ARRAYLANG

global

ADO Connection $objDatabase

Return values
null

taskTypeDropDown()

Get Tasktype Dropdown

public taskTypeDropDown(object $objTpl[, int $selectedType = 0 ]) : null
Parameters
$objTpl : object
$selectedType : int = 0
Tags
global

ADO Connection $objDatabase

global

Array $_ARRAYLANG

Return values
null

toggleIndustryType()

Industry type Change Status

public toggleIndustryType(int $industryEntry) : void
Parameters
$industryEntry : int

entry id

Tags
global

ADO Connection $objDatabase

toggleMembership()

Change Membership Status

public toggleMembership(int $entryId) : void
Parameters
$entryId : int

entry id

Tags
global

ADO Connection $objDatabase

toggleStage()

change stage status

public toggleStage(int $successEntry) : void
Parameters
$successEntry : int

entry id

Tags
global

ADO Connection $objDatabase

global

Array $_ARRAYLANG

unlinkContact()

Unlink the contact

public unlinkContact(int $contactId) : null
Parameters
$contactId : int
Tags
global

ADO Connection $objDatabase

Return values
null

updateCustomerContacts()

Update Customer Contacts

public updateCustomerContacts(array<string|int, mixed> $contacts, int $customerId) : null
Parameters
$contacts : array<string|int, mixed>
$customerId : int
Tags
global

ADO Connection $objDatabase

Return values
null

updateCustomerMemberships()

Update Customer Memberships

public updateCustomerMemberships(array<string|int, mixed> $memberShips, int $customerId) : null
Parameters
$memberShips : array<string|int, mixed>
$customerId : int
Tags
global

ADO Connection $objDatabase

Return values
null

validateCustomer()

Validate the Customer

public validateCustomer([string $customerName = '' ][, int $customerId = '' ][, int $id = 0 ]) : bool
Parameters
$customerName : string = ''
$customerId : int = ''
$id : int = 0
Tags
global

ADO Connection $objDatabase

Return values
bool

checkMemoryLimit()

This method checks the required memory is available for the import process if not then it will try to increase the memory limit.

protected checkMemoryLimit() : bool
Return values
bool

True if memory limit is greater than required memory, otherwise false if unable to set a memory limit

createThumbnailOfPicture()

Create thumbnail of image

protected createThumbnailOfPicture(string $imageName) : string
Parameters
$imageName : string
Return values
string

getTaskPermission()

Returns true or false for task edit and delete permission

protected getTaskPermission(int $added_user, int $assigned_user) : bool

Returns true or false for task edit and delete permission.

Parameters
$added_user : int

The addeduser of the task

$assigned_user : int

responsible user

Return values
bool

True if the user has the access, false otherwise

getTemporaryUploadPath()

Gets the temporary upload location for files.

protected static getTemporaryUploadPath(int $submissionId, mixed $fieldId, mixed $dir) : array<string|int, mixed>
Parameters
$submissionId : int
$fieldId : mixed
$dir : mixed
Tags
throws
ContactException
Return values
array<string|int, mixed>

array('path','webpath', 'dirname')

moveUploadedImageInToPlace()

Move uploaded image into respective folder

protected static moveUploadedImageInToPlace(object $objUser, string $tmpImageName, string $name[, bool $profilePic = false ]) : string
Parameters
$objUser : object
$tmpImageName : string
$name : string
$profilePic : bool = false
Return values
string

sendCsvImportResponse()

Send a response for csv import

protected sendCsvImportResponse(string $fileName, string $importStatus, string $importMsg) : mixed
Parameters
$fileName : string

File name

$importStatus : string

Import status success or error

$importMsg : string

Import message


        
On this page

Search results