ContactLib
in package
ContactLib
Tags
Table of Contents
Constants
- CHECK_TYPE_ALL = 1
- CHECK_TYPE_ALPHA = 4
- CHECK_TYPE_EMAIL = 2
- CHECK_TYPE_INTEGER = 5
- CHECK_TYPE_PHONE = 6
- CHECK_TYPE_URL = 3
- UPLOAD_DIR = '/images/attach/'
Properties
- $_arrSettings : mixed
- $arrCheckTypes : mixed
- Regexpression list
- $arrForms : mixed
- $_arrRecipients : mixed
- $_lastRecipientId : mixed
- $legacyMode : bool
Methods
- _deleteFormRecipients() : bool
- delete recipients
- _getJsSourceCode() : mixed
- Get Javascript Source
- addForm() : mixed
- Add a new form
- deleteFormEntry() : mixed
- getContactFormCaptchaStatus() : mixed
- getContactFormDetails() : mixed
- getFormEntries() : mixed
- getFormEntry() : mixed
- getFormFieldNames() : mixed
- getFormFields() : array<string|int, mixed>
- Get the form fields
- getHighestSortValue() : int
- return the highest sort value of a recipient list
- getLastRecipientId() : int
- return the last recipient id
- getRecipients() : array<string|int, mixed>
- Return the recipients of a form
- getSettings() : mixed
- initCheckTypes() : mixed
- initContactForms() : mixed
- Read the contact forms
- initSettings() : mixed
- isUniqueFormName() : bool
- Check if there already exist a form with this name
- updateForm() : mixed
- Update an existing form
- addFormField() : int
- Add a form field to the database
- addRecipient() : mixed
- Add a new recipient
- cleanFormFields() : mixed
- Remove the form fields that are not in the given list
- cleanRecipients() : mixed
- Delete the recipients that aren't wanted anymore
- deleteForm() : mixed
- Delete a form
- getFormEntity() : mixed
- Get the form entity
- insertFormLangValues() : mixed
- Insert the language values, update them if they already exist
- setFormFieldLang() : mixed
- Add a form lang to a field
- updateFormField() : mixed
- Update a form field
- updateRecipient() : mixed
- Update the recipient
- _deleteFormFieldsAndDataByFormId() : mixed
- Delete form fields and data
- setRecipientLang() : mixed
- Set the recipient name of a lang
Constants
CHECK_TYPE_ALL
public
mixed
CHECK_TYPE_ALL
= 1
CHECK_TYPE_ALPHA
public
mixed
CHECK_TYPE_ALPHA
= 4
CHECK_TYPE_EMAIL
public
mixed
CHECK_TYPE_EMAIL
= 2
CHECK_TYPE_INTEGER
public
mixed
CHECK_TYPE_INTEGER
= 5
CHECK_TYPE_PHONE
public
mixed
CHECK_TYPE_PHONE
= 6
CHECK_TYPE_URL
public
mixed
CHECK_TYPE_URL
= 3
UPLOAD_DIR
public
string
UPLOAD_DIR
= '/images/attach/'
Default upload directory
Properties
$_arrSettings
public
mixed
$_arrSettings
$arrCheckTypes
Regexpression list
public
mixed
$arrCheckTypes
$arrForms
public
mixed
$arrForms
$_arrRecipients
protected
mixed
$_arrRecipients
= array()
$_lastRecipientId
protected
mixed
$_lastRecipientId
$legacyMode
protected
bool
$legacyMode
Methods
_deleteFormRecipients()
delete recipients
public
_deleteFormRecipients(int $id) : bool
Parameters
- $id : int
Return values
bool_getJsSourceCode()
Get Javascript Source
public
_getJsSourceCode(mixed $id, mixed $formFields[, mixed $preview = false ][, mixed $show = false ]) : mixed
Makes the sourcecode for the javascript based field checking
Parameters
- $id : mixed
- $formFields : mixed
- $preview : mixed = false
- $show : mixed = false
Tags
addForm()
Add a new form
public
addForm(string $emails, string $senderEmail, string $senderName, bool $showForm, bool $useCaptcha, bool $useCustomStyle, bool $sendCopy, mixed $useEmailOfSender, mixed $sendHtmlMail, mixed $sendAttachment, mixed $saveDataInCrm, mixed $crmCustomerGroups, mixed $sendMultipleReply) : mixed
Parameters
- $emails : string
- $senderEmail : string
-
E-mail address of sender
- $senderName : string
-
Name of sender
- $showForm : bool
- $useCaptcha : bool
- $useCustomStyle : bool
- $sendCopy : bool
- $useEmailOfSender : mixed
- $sendHtmlMail : mixed
- $sendAttachment : mixed
- $saveDataInCrm : mixed
- $crmCustomerGroups : mixed
- $sendMultipleReply : mixed
Tags
deleteFormEntry()
public
deleteFormEntry(mixed $id) : mixed
Parameters
- $id : mixed
getContactFormCaptchaStatus()
public
getContactFormCaptchaStatus(mixed $id) : mixed
Parameters
- $id : mixed
getContactFormDetails()
public
getContactFormDetails(mixed $id, mixed &$arrEmails, mixed &$senderEmail, mixed &$senderName, mixed &$subject, mixed &$feedback, mixed &$mailTemplate, mixed &$showForm, mixed &$useCaptcha, mixed &$sendCopy, mixed &$useEmailOfSender, mixed &$htmlMail, mixed &$sendAttachment, mixed &$saveDataInCRM, mixed &$crmCustomerGroups, mixed &$sendMultipleReply) : mixed
Parameters
- $id : mixed
- $arrEmails : mixed
- $senderEmail : mixed
- $senderName : mixed
- $subject : mixed
- $feedback : mixed
- $mailTemplate : mixed
- $showForm : mixed
- $useCaptcha : mixed
- $sendCopy : mixed
- $useEmailOfSender : mixed
- $htmlMail : mixed
- $sendAttachment : mixed
- $saveDataInCRM : mixed
- $crmCustomerGroups : mixed
- $sendMultipleReply : mixed
getFormEntries()
public
getFormEntries(mixed $formId, mixed &$arrCols, mixed $pagingPos, mixed &$paging[, mixed $limit = true ]) : mixed
Parameters
- $formId : mixed
- $arrCols : mixed
- $pagingPos : mixed
- $paging : mixed
- $limit : mixed = true
getFormEntry()
public
getFormEntry(mixed $entryId) : mixed
Parameters
- $entryId : mixed
getFormFieldNames()
public
getFormFieldNames(mixed $id) : mixed
Parameters
- $id : mixed
getFormFields()
Get the form fields
public
getFormFields(int $formID) : array<string|int, mixed>
Parameters
- $formID : int
Tags
Return values
array<string|int, mixed>getHighestSortValue()
return the highest sort value of a recipient list
public
getHighestSortValue(mixed $formId) : int
Parameters
- $formId : mixed
Return values
intgetLastRecipientId()
return the last recipient id
public
getLastRecipientId([mixed $refresh = false ]) : int
Parameters
- $refresh : mixed = false
Return values
intgetRecipients()
Return the recipients of a form
public
getRecipients(int $formID[, mixed $allLanguages = true ]) : array<string|int, mixed>
Parameters
- $formID : int
- $allLanguages : mixed = true
Tags
Return values
array<string|int, mixed>getSettings()
public
getSettings([mixed $reinitialize = false ]) : mixed
Parameters
- $reinitialize : mixed = false
initCheckTypes()
public
initCheckTypes() : mixed
initContactForms()
Read the contact forms
public
initContactForms([int $id = 0 ][, string $order = null ]) : mixed
Parameters
- $id : int = 0
-
Form ID
- $order : string = null
-
the order for the sql query (comes from Sorting class)
initSettings()
public
initSettings() : mixed
isUniqueFormName()
Check if there already exist a form with this name
public
isUniqueFormName(string $name, int $lang[, int $id = 0 ]) : bool
Parameters
- $name : string
- $lang : int
- $id : int = 0
Tags
Return values
boolupdateForm()
Update an existing form
public
updateForm(int $formID, string $emails, string $senderEmail, string $senderName, bool $showForm, bool $useCaptcha, bool $useCustomStyle, bool $sendCopy, mixed $useEmailOfSender, mixed $sendHtmlMail, mixed $sendAttachment, mixed $saveDataInCrm, mixed $crmCustomerGroups, mixed $sendMultipleReply) : mixed
Parameters
- $formID : int
- $emails : string
- $senderEmail : string
-
E-mail address of sender
- $senderName : string
-
Name of sender
- $showForm : bool
- $useCaptcha : bool
- $useCustomStyle : bool
- $sendCopy : bool
- $useEmailOfSender : mixed
- $sendHtmlMail : mixed
- $sendAttachment : mixed
- $saveDataInCrm : mixed
- $crmCustomerGroups : mixed
- $sendMultipleReply : mixed
Tags
addFormField()
Add a form field to the database
protected
addFormField(int $formID, array<string|int, mixed> $field) : int
Parameters
- $formID : int
- $field : array<string|int, mixed>
Tags
Return values
intaddRecipient()
Add a new recipient
protected
addRecipient(int $formID, array<string|int, mixed> $recipient) : mixed
Parameters
- $formID : int
- $recipient : array<string|int, mixed>
Tags
cleanFormFields()
Remove the form fields that are not in the given list
protected
cleanFormFields(int $formID, array<string|int, mixed> $formFields) : mixed
Parameters
- $formID : int
- $formFields : array<string|int, mixed>
Tags
cleanRecipients()
Delete the recipients that aren't wanted anymore
protected
cleanRecipients(int $formID, array<string|int, mixed> $recipients) : mixed
Parameters
- $formID : int
- $recipients : array<string|int, mixed>
Tags
deleteForm()
Delete a form
protected
deleteForm(mixed $id) : mixed
Parameters
- $id : mixed
Tags
getFormEntity()
Get the form entity
protected
getFormEntity(int $id, string $emails, string $senderEmail, string $senderName, bool $showForm, bool $useCaptcha, bool $useCustomStyle, bool $sendCopy, mixed $useEmailOfSender, mixed $sendHtmlMail, mixed $sendAttachment, mixed $saveDataInCrm, mixed $crmCustomerGroups, mixed $sendMultipleReply) : mixed
Parameters
- $id : int
- $emails : string
- $senderEmail : string
-
E-mail address of sender
- $senderName : string
-
Name of sender
- $showForm : bool
- $useCaptcha : bool
- $useCustomStyle : bool
- $sendCopy : bool
- $useEmailOfSender : mixed
- $sendHtmlMail : mixed
- $sendAttachment : mixed
- $saveDataInCrm : mixed
- $crmCustomerGroups : mixed
- $sendMultipleReply : mixed
insertFormLangValues()
Insert the language values, update them if they already exist
protected
insertFormLangValues(int $formID, int $langID, mixed $isActive, string $name, string $text, string $feedback, mixed $mailTemplate, string $subject) : mixed
Parameters
- $formID : int
- $langID : int
- $isActive : mixed
- $name : string
- $text : string
- $feedback : string
- $mailTemplate : mixed
- $subject : string
Tags
setFormFieldLang()
Add a form lang to a field
protected
setFormFieldLang(int $fieldID, mixed $langID, array<string|int, mixed> $values) : mixed
In case it already exists, update the value
Parameters
- $fieldID : int
- $langID : mixed
- $values : array<string|int, mixed>
Tags
updateFormField()
Update a form field
protected
updateFormField(array<string|int, mixed> $field) : mixed
Parameters
- $field : array<string|int, mixed>
Tags
updateRecipient()
Update the recipient
protected
updateRecipient(array<string|int, mixed> $recipient) : mixed
Parameters
- $recipient : array<string|int, mixed>
Tags
_deleteFormFieldsAndDataByFormId()
Delete form fields and data
private
_deleteFormFieldsAndDataByFormId(int $id) : mixed
Parameters
- $id : int
Tags
setRecipientLang()
Set the recipient name of a lang
private
setRecipientLang(int $rcID, int $langID, string $name) : mixed
Parameters
- $rcID : int
- $langID : int
- $name : string