ContactManager
extends ContactLib
in package
ContactManager
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
- formMailTemplate = '<table> <tbody> <!-- BEGIN form_field --> <tr> <td>[[FIELD_LABEL]]</td> <td>[[FIELD_VALUE]]</td> </tr> <!-- END form_field --> </tbody> </table>'
- UPLOAD_DIR = '/images/attach/'
Properties
- $_arrFormFieldTypes : mixed
- $_arrSettings : mixed
- $_arrUserAccountData : mixed
- $_csvCharset : mixed
- $_csvEnclosure : mixed
- $_csvLFB : mixed
- $_csvSeparator : mixed
- $_invalidRecipients : mixed
- $_objTpl : mixed
- $_pageTitle : mixed
- $_statusMessageErr : mixed
- $_statusMessageOk : mixed
- $arrCheckTypes : mixed
- Regexpression list
- $arrForms : mixed
- $em : mixed
- $_arrRecipients : mixed
- $_lastRecipientId : mixed
- $legacyMode : bool
- $act : mixed
- $nonValueFormFieldTypes : mixed
Methods
- __construct() : mixed
- PHP5 constructor
- _deleteFormEntry() : mixed
- _deleteFormRecipients() : bool
- delete recipients
- _escapeCsvValue() : string
- Escape a value that it could be inserted into a csv file.
- _getContactFormPage() : mixed
- _getCsv() : mixed
- Get CSV File
- _getFormFieldAttribute() : mixed
- _getFormFieldCheckTypesMenu() : mixed
- Check Types Menu
- _getFormFieldRequiredCheckBox() : mixed
- _getFormFieldTypesMenu() : mixed
- Field Types Menu
- _getJsSourceCode() : mixed
- Get Javascript Source
- _getSettingsPage() : mixed
- _modifyForm() : mixed
- Modify Form
- _replaceFilename() : mixed
- Replaces the special characters
- _saveForm() : mixed
- Save Form
- _saveSettings() : mixed
- _showRecipients() : mixed
- Display recipients in backend
- addForm() : mixed
- Add a new form
- csv_mb_convert_encoding() : mixed
- 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
- getPage() : mixed
- Get page
- 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
- setRecipients() : array<string|int, mixed>
- update recipient list
- updateForm() : mixed
- Update an existing form
- _contactFormEntries() : void
- _contactForms() : void
- _deleteForm() : void
- Delete a form
- _getEntriesPage() : void
- _getEntryDetails() : string
- _settings() : void
- 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
- disableContentSite() : void
- getFormEntity() : mixed
- Get the form entity
- getIdsOfUsedLocalesOfForm() : array<string|int, mixed>
- getPagesByLocaleIdOfForm() : array<string|int, mixed>
- insertFormLangValues() : mixed
- Insert the language values, update them if they already exist
- setFormFieldLang() : mixed
- Add a form lang to a field
- setNavigation() : void
- syncApplicationPages() : void
- Tries to set up application pages for the selected locales of form identified by ID $formId.
- updateFormField() : mixed
- Update a form field
- updateRecipient() : mixed
- Update the recipient
- _getFormFieldsFromPost() : mixed
- Get the form fields from the post variables
- getFileIcon() : string
- Returns the appropriate icon of the given file.
- getPostRecipients() : string
- Get the recipient addresses from the post
- getRecipientsFromPost() : array<string|int, mixed>
- Parse the post values and return a list of recipients
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
formMailTemplate
public
mixed
formMailTemplate
= '<table>
<tbody>
<!-- BEGIN form_field -->
<tr>
<td>[[FIELD_LABEL]]</td>
<td>[[FIELD_VALUE]]</td>
</tr>
<!-- END form_field -->
</tbody>
</table>'
UPLOAD_DIR
public
string
UPLOAD_DIR
= '/images/attach/'
Default upload directory
Properties
$_arrFormFieldTypes
public
mixed
$_arrFormFieldTypes
$_arrSettings
public
mixed
$_arrSettings
$_arrUserAccountData
public
mixed
$_arrUserAccountData
$_csvCharset
public
mixed
$_csvCharset
= null
$_csvEnclosure
public
mixed
$_csvEnclosure
= null
$_csvLFB
public
mixed
$_csvLFB
= null
$_csvSeparator
public
mixed
$_csvSeparator
= null
$_invalidRecipients
public
mixed
$_invalidRecipients
= false
$_objTpl
public
mixed
$_objTpl
$_pageTitle
public
mixed
$_pageTitle
= ''
$_statusMessageErr
public
mixed
$_statusMessageErr
$_statusMessageOk
public
mixed
$_statusMessageOk
$arrCheckTypes
Regexpression list
public
mixed
$arrCheckTypes
$arrForms
public
mixed
$arrForms
$em
public
mixed
$em
= null
$_arrRecipients
protected
mixed
$_arrRecipients
= array()
$_lastRecipientId
protected
mixed
$_lastRecipientId
$legacyMode
protected
bool
$legacyMode
$act
private
mixed
$act
= ''
$nonValueFormFieldTypes
private
mixed
$nonValueFormFieldTypes
= array('horizontalLine', 'fieldset', 'label')
Methods
__construct()
PHP5 constructor
public
__construct() : mixed
Tags
_deleteFormEntry()
public
_deleteFormEntry() : mixed
_deleteFormRecipients()
delete recipients
public
_deleteFormRecipients(int $id) : bool
Parameters
- $id : int
Return values
bool_escapeCsvValue()
Escape a value that it could be inserted into a csv file.
public
_escapeCsvValue(string $value) : string
Parameters
- $value : string
Return values
string_getContactFormPage()
public
_getContactFormPage() : mixed
_getCsv()
Get CSV File
public
_getCsv() : mixed
Tags
_getFormFieldAttribute()
public
_getFormFieldAttribute(mixed $id, mixed $type, mixed $attr[, mixed $show = true ][, mixed $langid = 0 ]) : mixed
Parameters
- $id : mixed
- $type : mixed
- $attr : mixed
- $show : mixed = true
- $langid : mixed = 0
_getFormFieldCheckTypesMenu()
Check Types Menu
public
_getFormFieldCheckTypesMenu(string $name, mixed $id, mixed $type, int $selected) : mixed
Generates a selection list with all possible types which can be checked
Parameters
- $name : string
-
Name of the selection list
- $id : mixed
- $type : mixed
- $selected : int
-
Which option has to be selected
Tags
_getFormFieldRequiredCheckBox()
public
_getFormFieldRequiredCheckBox(mixed $name, mixed $id, mixed $type, mixed $selected) : mixed
Parameters
- $name : mixed
- $id : mixed
- $type : mixed
- $selected : mixed
_getFormFieldTypesMenu()
Field Types Menu
public
_getFormFieldTypesMenu(mixed $name, mixed $selectedType[, mixed $attrs = '' ]) : mixed
Generates a xhtml selection list with all the field types
Parameters
- $name : mixed
- $selectedType : mixed
- $attrs : mixed = ''
Tags
_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
_getSettingsPage()
public
_getSettingsPage() : mixed
_modifyForm()
Modify Form
public
_modifyForm([bool $copy = false ]) : mixed
Shows the modifying page.
Parameters
- $copy : bool = false
-
If the form should be copied or not
Tags
_replaceFilename()
Replaces the special characters
public
_replaceFilename(mixed $filename) : mixed
Replaces the special characters in a filename like whitespaces or umlauts. Needed by the CSV generator.
Parameters
- $filename : mixed
-
string Filename where the characters have to be replaced
Tags
_saveForm()
Save Form
public
_saveForm() : mixed
Saves the form data
Tags
_saveSettings()
public
_saveSettings() : mixed
_showRecipients()
Display recipients in backend
public
_showRecipients([array<string|int, mixed> $arrRecipients = array() ]) : mixed
Parameters
- $arrRecipients : array<string|int, mixed> = array()
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
csv_mb_convert_encoding()
public
csv_mb_convert_encoding(mixed $data) : mixed
Parameters
- $data : mixed
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
intgetPage()
Get page
public
getPage() : mixed
Get the development page
Tags
getRecipients()
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
boolsetRecipients()
update recipient list
public
setRecipients(mixed $arrRecipients) : array<string|int, mixed>
Parameters
- $arrRecipients : mixed
Return values
array<string|int, mixed>updateForm()
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
_contactFormEntries()
protected
_contactFormEntries() : void
_contactForms()
protected
_contactForms() : void
_deleteForm()
Delete a form
protected
_deleteForm() : void
Tags
_getEntriesPage()
protected
_getEntriesPage() : void
_getEntryDetails()
protected
_getEntryDetails(mixed $arrEntry, mixed $formId) : string
Parameters
- $arrEntry : mixed
- $formId : mixed
Return values
string_settings()
protected
_settings() : void
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
disableContentSite()
protected
disableContentSite(int $formId) : void
Parameters
- $formId : int
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
getIdsOfUsedLocalesOfForm()
protected
getIdsOfUsedLocalesOfForm(int $formId) : array<string|int, mixed>
Parameters
- $formId : int
Return values
array<string|int, mixed>getPagesByLocaleIdOfForm()
protected
getPagesByLocaleIdOfForm(int $formId) : array<string|int, mixed>
Parameters
- $formId : int
Return values
array<string|int, 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
setNavigation()
protected
setNavigation() : void
syncApplicationPages()
Tries to set up application pages for the selected locales of form identified by ID $formId.
protected
syncApplicationPages(int $formId) : void
Parameters
- $formId : int
-
ID of for to set up application pages for.
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
_getFormFieldsFromPost()
Get the form fields from the post variables
private
_getFormFieldsFromPost() : mixed
This is only used when an error on saving occurs, to reparse the form fields.
getFileIcon()
Returns the appropriate icon of the given file.
private
getFileIcon(string $file) : string
Parameters
- $file : string
Return values
string —$img
getPostRecipients()
Get the recipient addresses from the post
private
getPostRecipients() : string
Tags
Return values
stringgetRecipientsFromPost()
Parse the post values and return a list of recipients
private
getRecipientsFromPost() : array<string|int, mixed>