NFZohoCampaign_CommLogDataHandling
Retrieves, adds structure and filters, returns data from CommLog
CommLog is loaded with master init, thus data is available with single
DB call. This class enables quick manipulation of a given key within
the CommLog data
-
Method
- __construct public
- Method
- delimitedData public
-
Returns keyed records of data delimited into a string
Paramstring $key Field key of values to returnParamstring $delimiter Separator between elementsReturnstring
Method
- constructTableRows public
-
Construct HTML table of given data keys for cells within each row
By default, each entry is on a single row; if field keys are displayed,
then each field has its own row
Paramarray $keys Field keys for table cellsParaminteger $count Number of records to returnParamboolean $use_key Display field keys in table -
uses separate row per fieldReturnstring HTML string constructing table
Method
- constructCellMarkup /** * Implodes record into cells, or rows with key/value cells * @param array $record * @param boolean $use_key * @return string */
- Method
- $array_keys array_map
- Method
- column public
-
Returns indexed array of single column
Paramstring $key Element keyReturnarray|null
Method
- filterKeys public
-
Returns only the desired keyed fields from data
Paramarray $keys Array of field namesReturnarray|null
Method
- latestRecord public
-
Returns the last element added to data; null if not available
Paramarray $keys Specific keys to be returnedParamboolean $implode Return value as implodedReturnmixed
Method
- getRecordByIndex public
-
Returns a record by the index value
Paraminteger $indexReturnarray
Method
- allData public
-
Returns data as stored in options table
Returnarray|null
NFZohoCampaign_Constants
Constants for use throughout extension
Set as protected properties with no ability to set
-
Method
- __get public
-
Returns the value of a constant to modify dynamically
Applies a filter
Paramstring $propertyReturnmixec
NFZohoCampaign_Factory
Factory providing instantiated objects
NFZohoCampaign_FieldMap
Manipulates the configured FieldMapLookup for more advanced handling
-
Method
- __construct public
- Configures the FieldMapLookup Method
- init public
- Runs init functions for filtering Method
- modifyFieldMapLookup protected
- Method
- separateIntoModules protected
- Group each field map by Module for quicker handling Method
- extractMultiplesAdvancedCommands protected
-
Checks if advanced command modifies module count and sets count value
1 is the default, 0 removes from list
Method
- iterateMultiples protected
- Iterates to call method that adds multiple module values to field lookup Method
- addMultipleModule protected
-
Adds a multiple to a given module
Duplicates each field in module, adding a delimiter plus the index number to the key and adding a delimiter to the label plus the index number PLUS ONE (because people default counting from 1)
Paramstring $module Module for adding multiplesParamint $counter Index for which multiple to add
Method
- removeModules protected
- Checks if advanced command removes module, then removes it Method
- recombineFieldMap protected
- Recombines separated modules into single field map array Method
- labelKeyPairs public
- Method
- maxModuleCount public
- Returns the count of the highest number of modules Used to set an upper limit on how many times to iterate the field maps Method
- fieldMapLookup public
-
Returns the full field map lookup as originally configured
Returnarray
NFZohoCampaign_MergeTags
-
Method
- __construct public
- Method
- createListKeyMergeTag protected
-
Creates List Key merge tag;
Returnnull
Method
- createSubscriberFieldMergeTags protected
-
Adds stored subscriber fields as merge tags for simpler field mapping
Returnnull
NFZohoCampaign_SupportSettings
Displays support settings on settings page
-
Method
- __construct public
- Method
- addSupportAdvancedCommandDescription public
-
Adds 'support' to Advanced Commands descriptions
Paramarray $descriptionsReturnarray
Method
- extractInjector protected
- Extracts settings and objects required of the injector Method
- constructDataHandlers protected
-
Construct the data handlers for the stored keyed data
Each key in the comm log has a separate object
Method
- buildCommStatusHTML protected
- Builds Communication Status including messages and troubleshooting Method
- displayRequestLog protected
-
Displays requests
If 'support' advanced command, display most recent; optional command to display any number of previous recordsReturnnull
Method
- displayFieldMap protected
-
Displays field map repeaters
If 'support' advanced command, display most recent; optional command to display any number of previous recordsReturnnull
Method
- displayJSONRequest protected
-
Displays JSON request(s)
If 'support' advanced command, display most recent; optional command to display any number of previous recordsReturnnull
Method
- displayResponseArray protected
-
Displays JSON request(s)
If 'support' advanced command, display most recent; optional command to display any number of previous recordsReturnnull
Method
- displayWPError protected
- Method
- removeUnusedSettings protected
-
Remove settings that have not be built for display
Configured settings have placeholders; rather than unset each one by determining what advanced commands can turn them on or off, compare the configured version with the support version and, if they are the same, remove it because it only has a placeholder value and not of use
NFZohoCampaign_MailingLists_MailingListsMaster
Refreshes and stores a list of mailing lists
-
Method
- __construct public
- Method
- pluginSettings public
-
Adds the configured settings to the master plugin's settings group
Paramarray $master_settings Incoming settings from Ninja FormsReturnarray
Method
- configureSettings protected
-
Builds array of plugin settings
Creates link for listener to refresh mailing listsReturnarray Plugin settings
Method
- addListenerWebhook public
- Static Method
- process /** * Triggered by listener to get Subscriber Fields * * @param array $listener Webhook listener array * @param type $response * * @see LB3Tools_Primary_Listener $webhook_listener_array * @see LB3Tools_Primary_Listener->addWebhookListeners */
-
Triggered by listener to get Subscriber Fields
Paramarray $listener Webhook listener arrayParamtype $response
SeeLB3Tools_Primary_Listener $webhook_listener_arraySeeLB3Tools_Primary_Listener->addWebhookListeners
Method
- settingsPageMailingListsHTML protected
-
Returns HTML formatted string for settings page output of Field Names
Returnstring
Method
- addAdvancedCommandDescriptor public
-
Adds description to Advanced Commands
Paramarray $descriptions Array of incoming desriptions for Advanced CommandsReturnarray
NFZohoCampaign_MailingLists_MailingListsProcess
Description of GetSubscriberFieldProcess
-
Method
- __construct public
- Method
- refreshMailingLists public
- Get Subscriber Fields from API and store in CommLog Method
- logResponseArray protected
-
Remove redundant data and append response array to CommLog
Local variable set up for unsetting of redundant data to protect class property values in case they are needed elsewhere Adds timestamp as value for 'response_array' key in request_log
Method
- initializeRequestLog public
- Initializes request log with config'd default and submission data
NFZohoCampaign_Subscribe_SubscribeAction
NF Action that takes form submission and subscribes email to Campaign
-
Method
- __construct public
-
Instantiate SubscribeMaster class to add NF Action
Paramarray $injector
Method
- enqueueAdminScripts public
- Method
- addFieldMapRepeater public
- Adds Field Map Option Repeater to Action Settings Method
- builderTemplates public
- Include Template file for option repeater Method
- get_lists public
- Implements abstract method of ActionNewsletter class Method
- process public
NFZohoCampaign_Subscribe_SubscribeMaster
Adds NF Action to subscribe email to Zoho Campaign
-
Method
- __construct public
-
Instantiate SubscribeMaster class to add NF Action
Paramarray $injector
Method
- registerActions public
-
Register the Subscribe Zoho Campaign Action
Paramarray $actionsReturnarray
NFZohoCampaign_Subscribe_SubscribeProcess
-
Method
- __construct public
-
Receives form submission data and sends requests to Zoho Campaigns
Paramarray $action_settings Submission action settingsParaminteger $form_id Submission form idParamarray $data Submission form dataParamarray $injector Dependency injectorParamarray $data_to_extract Associative array identifying action_setting key for required data, where the key is a required setting and the value is the action_setting key that holds the submitted data
Method
- initializeRequestLog public
- Initializes request log with config'd default and submission data Method
- prepareSubmissionData public
- Prepare form submission data for API request Method
- subscribeSubmissionData public
- Subscribe form submission data using API; stores response array Method
- logResponseArray protected
- Remove redundant data and append to CommLog Method
- extractFieldMapRepeaterSubmission protected
- Extracts field map repeater data and stores as property Method
- extractListKey protected
- Checks for list key in field map and extracts it as separate property Method
- encodeJSONRequest protected
- Encodes request for subscribing new email Method
- responseArray public
-
Returns response values in response array structure
SeeConfig/ZohoCampaignAPIResponseArray.phpReturnarray
Method
- extractMergeTag protected
-
Searches for zohocampaigns: merge tags and returns first found
Paramstring $textReturnstring
NFZohoCampaign_SubscriberFields_SubscriberFieldsMaster
Refreshes and stores a list of subscriber fields
-
Method
- __construct public
- Method
- addAdvancedCommandDescriptor public
-
Adds description to Advanced Commands
Paramarray $descriptions Array of incoming desriptions for Advanced CommandsReturnarray
Method
- pluginSettings public
-
Adds the configured settings to the master plugin's settings group
Paramarray $master_settings Incoming settings from Ninja FormsReturnarray
Method
- configureSettings protected
-
Builds array of plugin settings
Creates link for listener to refresh subscriber fieldsReturnarray Plugin settings
Method
- addListenerWebhook public
- Static Method
- process /** * Triggered by listener to get Subscriber Fields * * @param array $listener Webhook listener array * @param type $response * * @see LB3Tools_Primary_Listener $webhook_listener_array * @see LB3Tools_Primary_Listener->addWebhookListeners */
-
Triggered by listener to get Subscriber Fields
Paramarray $listener Webhook listener arrayParamtype $response
SeeLB3Tools_Primary_Listener $webhook_listener_arraySeeLB3Tools_Primary_Listener->addWebhookListeners
Method
- settingsPageSubscriberFieldsHTML protected
-
Returns HTML formatted string for settings page output of Field Names
Returnstring
NFZohoCampaign_SubscriberFields_SubscriberFieldsProcess
Get subscriber fields and store in CommDataLog
-
Method
- __construct public
- Method
- refreshSubscriberFields public
- Get Subscriber Fields from API and store in CommLog Method
- logResponseArray protected
-
Remove redundant data and append respone array to CommLog
Local variable set up for unsetting of redundant data to protect class property values in case they are needed elsewhere Adds timestamp as value for 'response_array' key in request_log
Method
- initializeRequestLog public
- Initializes request log with config'd default and submission data
LB3Tools_Abstracts_AdvancedCommandsAbstract
-
Method
- __construct public
-
Adds the Advanced Commands setting
Paramstring $settings_key NF Settings key where advanced commands field is stored
Method
- pluginSettings public
- Method
- getNinjaFormSetting protected
-
Retrieves value stored by Ninja_Forms
Paramstring $keyReturnmixed
Method
- advancedCommands public
-
Returns the stored advanced codes for the plugin
Stored as comma-delimited, explodes into array of string commands
Returnarray Advanced codes as array
Method
- isAdvancedCommandSet public
-
Given an advanced command, evaluates if it is set or not
Paramstring $commandReturnbool TRUE is command is set, FALSE if not set
Method
- variableAdvancedCommand public
-
Searches advanced commands for variable values and returns variable
Given a prefixed command, returns suffix, false on fail
Paramstring $prefixReturnstring|bool Description
Method
- intAdvancedCommmand public
-
Searches advanced commands for prefixed values and returns integer suffix
Given a prefixed command, returns integer, false on fail
Paramstring $prefixReturninteger|bool Description
Method
- arrayAdvancedCommmand public
-
Searches advanced commands for prefixed values and returns array suffix
Given a prefixed command, returns array, exploded on '-', false on fail
Paramstring $prefixReturnarray|bool Description
LB3Tools_AdvancedCommands
Adds filters specified by an Advanced Command
Enables dashboard setting to apply hard coded filters
-
Method
- __construct public
-
Adds the Advanced Commands setting
Paramsrting $settings_key Key for Ninja Forms setting where advanced commands value is storedParamarray $injector Array of dependencies
Method
- pluginSettings public
-
Add the Advanced Commands setting
Paramarray $master_settingsReturnarray
LB3Tools_LB3Tools
Provides tools for simplifying code structure
Abstracts are included immediately.
AJAX Handler is only included when it is called by another file because
some methods in it will fail if called before the correct action hook
-
Method
- __construct public
-
Includes classes needed immediately
Paramarray $injector Injector used to get version number
Static Method
- ajaxHandler /** * Static method includes and returns AjaxHandler for building AJAX requests * @return \LB3Tools\AjaxHandler */
-
Static method includes and returns AjaxHandler for building AJAX requests
Return\LB3Tools\AjaxHandler
LB3Tools_Primary_CommDataLog
Manages updates to the communication data log
Retrieves existing db array for starting log; overwrites or appends
new communication data; writes log to db
-
Method
- __construct public
-
Retrieves existing CommData from db
If incoming value is not an array, sets CommData as empty arrayParamstring $db_key WP options table key storing data
Method
- initializeCommData public
-
Retrieves existing CommData from db
If incoming value is not an array, sets CommData as empty arrayParamstring $db_key WP options table key storing data
Method
- logKeyedData public
-
Appends new data inside CommLog with unique key
This is the function to use when logging a new entry.Paramstring $key Key in CommData where data is storedParammixed $sub_key Secondary key for new dataParammixed $data Data to be storedParaminteger $max_entries Limits the number of logged entries
If the given key has more than the max entries, the earliest entry(ies) are deleted.
Method
- append protected
-
Appends an entry to the indexed array in a given key
Paramstring $key Comm Data key storing the dataParammixed $entry Value to be appended as array elementParammixed $nested_key (Optional) Key to set associative array instead of indexed
Method
- unsetKey public
-
Removes existing data in key (
does not
initializes empty array)Paramstring $key Comm Data key storing the data
Method
- limitEntries protected
-
Limits the number of elements stored in the given key
Paramstring $key Comm Data key storing the dataParaminteger $max_entries Limit of entries to store
Method
- set public
-
Replaces existing value with a new value
Paramstring $keyParammixed $entry New value to be stored in key
Method
- storeCommData public
-
Stores CommData array in WP options table under given key
Other methods update the comm_data property but do not update the
options table to limit the number of db methods called. This method
updates the WP option to store multiple updates with a single request
Paramstring $db_key WP options table key storing data
Method
- get public
-
Returns keyed value from CommDataLog; null if key doesn't exist
Paramstring $keyReturnmixed|null
LB3Tools_Primary_Listener
Listens to the URL to extract commands
-
Method
- __construct public
- Method
- listener public
-
Listens for GET requests with specific commands
Calls specific functions based on the request made; uses a switch/case so that only vetted functions are called Webhook listeners automatically call a static method when the key-value pair is found
Method
- addGETKeys protected
-
Add the GET keys to monitor
Only querystring keys on this list will be heard
Method
- addGETListeners protected
- Listen for the GET querystring keys Method
- addAdvancedCommandWebhooks protected
-
Constructs and adds webhook listeners from advanced commands
Prefix array is built by filter; method iterates prefix array, checking if any of those prefixes are set as an advanced command. If set, the prefix, key, value, and class of that element is added to the listener array for listening
example: Filter added in class: "mailchimp_" => {mailchimp class inserted here}
Advanced command (this will listen for listener-code=secret-code and call the Mailchimp class' 'process' function mailchimp_listener-code=secret-code
Method
- addWebhookListeners public
- Iterates listener array for specified GET keys Webhooks added using webhook_listener_array filter and must specify a key, value, and class. If the key-value appears in the querystring, the class' static function process($listener,$response){} is called Method
- setPageSlug protected
- Builds the page slug for a given page Method
- runPageCommand protected
-
Calls methods based on page URI
Paramstring $page_url
Method
- __get public
-
Returns value of a GET query string key, null if not set
Paramstring $propertyReturnstring|boolean
LB3Tools_Primary_Settings
-
Method
- __construct public
-
Create plugin setting group and optional settings
Paramarray $injector Master plugin dependency injectorParamarray $configured_settings Array of plugin settings
Method
- pluginSettingsGroups public
-
Adds plugin Settings Group
Paramarray $groupsReturnarray
Method
- pluginSettings public
-
Adds the configured settings to the master plugin's settings group
Paramarray $master_settings Incoming settings from Ninja FormsReturnarray
Method
- appendAddedSettings protected
- Cycles through added settings and adds to configured settings in order Method
- addSettings public
-
Add pre-configured settings to settings section
If existing index value exists, look for next open index position and
use that.
Paramarray $array Array of configured setting(s) for NF Settings sectionParaminteger $index Position order for given settings
Method
- __get public
-
Returns a Ninja Form plugin setting; returns null if not set
Paramstring $nf_setting
LB3Tools_RequiredFunctions
Loads alternative versions of required functions if PHP version does not
support it
-
Method
- __construct public
- Method
- loadFx protected
-
Given function name, loads alternative version if not in PHP version
Paramstring $function_name
LB3Tools_RequiredFunctions
-
Method
- array_column /** * Returns the values from a single column of the input array, identified by * the $columnKey. * * Optionally, you may provide an $indexKey to index the values in the returned * array by the values from the $indexKey column in the input array. * * @param array $input A multi-dimensional array (record set) from which to pull * a column of values. * @param mixed $columnKey The column of values to return. This value may be the * integer key of the column you wish to retrieve, or it * may be the string key name for an associative array. * @param mixed $indexKey (Optional.) The column to use as the index/keys for * the returned array. This value may be the integer key * of the column, or it may be the string key name. * @return array */
AjaxHandler
Enqueues AJAX handler, returns values, sends back values after processing
-
Method
- __construct public
-
Constructs AJAX Handler with version for enqueuing
Paramtype $version
Method
- setAndActivate public
-
Set parameters, build and enqueue the jQuery script
Paramarray $localized_params Array of paramters to pass to AJAXParamstring $handle Enqueuing handle; use dashes in name. Handle is used as the filename.js. Handle with dashes replaced with underscores is used in add_action wp_ajax_handle_with_underscoresParamstring $file
Method
- activateScript public
- Build and enqueue the jQuery script Method
- enqueueMe protected
- Enqueue and localize the jQuery script Method
- setLocalizeParameters protected
- Method
- setHandle protected
- Method
- setFile protected
- Method
- getJSURL protected
Autoload
Autoloader loads namespaced classes in lib, Classes, and Feature directories
-
Method
- __construct public
-
Construct the autoloader with namespace for Master class
Paramstring $namespace Master class namespace, under which Features and Classes are filedParamstring $dir File directory of Master class
Method
- autoloader public
-
Autoloads namespaced classes in the Classes, Feature, and lib directories
Paramstring $classReturnnull
DatabaseStorageManager
Store and retrieve CRM data in the database
-
Method
- __construct public
-
Configures the storage parameters for a given request
Sets the option key where the data will be stored in the options table of the Wordpress database
Paramstring $request Key for DataStorageConfigurationParamarray $dsm_config Data storage configuration
Method
- storeData public
-
Stores the data in the options table by the configured key
Parammixed $data Given data to store
Method
- retrieveData public
-
Returns the data for the given request
Optionally can validate raw data from the db
Returnarray
Method
- getValidatedData protected
- Retrieves stored data and validates per default Method
- ensureDefaultData protected
-
Ensures default values are set
Paramarray $raw_dataReturnarray
ConstructRequests
Constructs the Requests using the FieldMapArray and OptionRepeater objects
Calls a validation class to validate form fields based on the special
instructions
-
Method
- __construct public
-
Constructs the Requests using the FieldMapArray and OptionRepeater objects
Iterates the field map array object, validating individual fields, then
adding the entry into the request object.
Param\FieldMapProcessor\FieldMapArray $field_map_arrayParamtype $option_repeater \FieldMapProcessor\Abstracts\OptionRepeaterAbstractParamtype $requests \FieldMapProcessor\Requests
Method
- iterateFieldArray protected
- Validates field and adds it to Request Also ensures value is not empty string to avoid overwriting values when form does not have an update. Method
- validateFormValue protected
-
Validates the form field value by a specified special instruction
Parammixed $incoming_value Incoming form field valueParamstring $special_instruction Option repeater special instructionReturnmixed
FieldMapArray
Constructs the Field Map Array from the submitted action
The Field Map Array is a construction of the form submission values with
a programmatic field map value to the CRM along with any additional
instructions
-
Method
- __construct public
-
Given the submitted option repeater values for the action, create Field Map Array
Paramarray $keyed_action_settings Option repeater submission values for the actionParam\Lb3CustomNamespace\Process\OptionRepeater $option_repeater
Method
- extractFieldMapArray protected
- Method
- fieldMapArray public
-
Returns the constructed field map array
Returnarray
FieldMapProcessor
Given Action Settings, extracts field maps into standard array for processing
-
Static Method
- fieldMapArray /** * Returns a Field Map Array Object * * @param array $keyed_action_settings * @param \LB3Tools\Abstracts\OptionRepeater $option_repeater * @return FieldMapArray */
-
Returns a Field Map Array Object
Paramarray $keyed_action_settingsParam\LB3Tools\Abstracts\OptionRepeater $option_repeaterReturnFieldMapArray
Static Method
- requestsObject /** * Returns the Requests Object * * This object contains various arrays of requests * @param array Lookup array that links child objects to their parents * @return Requests */
-
Returns the Requests Object
This object contains various arrays of requestsParamarray Lookup array that links child objects to their parentsReturnRequests
Static Method
- constructRequests /** * Constructs the Requests using the FieldMapArray and OptionRepeater objects * * @param FieldMapArray $field_map_array * @param \LB3Tools\Abstracts\OptionRepeaterAbstract $option_repeater * @param Requests $requests * @param object Validation object * @return ConstructRequests */
-
Constructs the Requests using the FieldMapArray and OptionRepeater objects
ParamFieldMapArray $field_map_arrayParam\LB3Tools\Abstracts\OptionRepeaterAbstract $option_repeaterParamRequests $requestsParamobject Validation objectReturnConstructRequests
FieldValidation
Static methods that return validated values
-
Static Method
- validate public
- Static Method
- validateDateFormat public
- Static Method
- forceBoolean public
- Method
- keepCharacters public
-
Remove any html tags but keep the special characters like apostrophe
and ampersand
TODO: determine how to handle this unused method
Static Method
- validateDateInterval public
- Static Method
- validateFileUpload public
- Static Method
- formatCurrency public
- Static Method
- semiColonDelimiter public
- Static Method
- replaceUnderscoreWithSpace public
ReplacePlaceholders
Searches email and success messages to replace placeholders with results
-
Method
- __construct public
- Method
- iterateReplaceableActions protected
- Iterates each action configured to have replaceable text Calls method to iterate and replace each placeholder within the action Method
- iteratePlaceholders protected
-
Iterates each replace_me in a given action with the specified replacement
Replacement value is an indexed array and gets imploded by the action
key's configured delimiter
Paramstring $action_key Key of the action in which to replace the replace_me text with the specified keyed value in the action_resultParamstring $delimiter Delimiter to separate array elements when replacing the text
Method
- actionSettings public
-
Return the action settings
Returnarray
Requests
Holds a structured array of individual requests
Accepts an array of parent-child links with which it can link child arrays
with their parents.
Holds an array of Record IDs used both for linking objects and updating
existing records
-
Method
- __construct public
-
Paramarray $parent_child_links Lookup array that links child objects to their parents
Method
- addFieldMap public
-
Adds a field map to the structured array and Duplicate Check if requested
Paramarray $instructionsParammixed $form_value
Method
- addNewId public
-
Adds a new ID to the new ID array
Paramstring $object_nameParaminteger $indexParamstring $id
Method
- linkParents public
-
Given an object and index, looks for newly created parents to link
Links to parents if they were created as earlier request. Matches on
index in a one-to-one structure or, if no matching index, links to
index = 0 in a one-to-many.
ex. - Two accounts and two contacts are matched one-to-one (each
contact matches to one account each while
one account with two contacts are matched one-to-many (both contacts
are linked to the single account)
Paramstring $object_name
Method
- setRequestTypes public
- After initial construction, set request types for all object requests If the request_array has a field 'record_id', then the request type is 'update' and that record_id identifies the record to update. Default is 'insert' Method
- iterateChildren protected
-
Links a given indexed child object with parents
Paramstring $object_nameParamarray $parentsParaminteger $index
Method
- addToStructuredArray protected
-
Adds a field map to the structured array
Paramarray $instructions Keys: 'object' 'index' 'field_nameParammixed $form_value
Method
- addToDuplicateCheckArray protected
-
Adds a field map to the duplicate check array
Paramarray $instructions Keys: 'object' 'index' 'field_nameParammixed $form_value
Method
- structuredArray public
-
Returns entire structured array or single objects portion, false if not set
Paramstring $object_nameReturnMixed
Method
- duplicateCheckArray public
- Method
- newlyCreatedIds public
- Method
- requestType public
FieldValidationAbstract
-
Static Method
- validate public
- Static Method
- validateDateFormat public
- Static Method
- forceBoolean public
- Static Method
- validateDateInterval public
- Static Method
- semiColonDelimiter public
- Static Method
- replaceUnderscoreWithSpace public
OptionRepeaterAbstract
-
Method
- fieldMapDropdown public
-
Returns the Field Map Dropdown
ReturnarraySeeLb3CustomNamespace\Process\OptionRepeater\$field_map_dropdown
Method
- fieldsToExtract public
-
Returns the FieldsToExtract
Returnarray
Method
- specialInstructions public
-
Returns the Special Instructions
Returnarray
Method
- lookupValue public
- Method
- fieldMapInstructions public
PageAjaxAbstract
Abstract setup for page AJAX setup
Simplifies the page-specific class to managing variables being passed and
handling the data back and forth
-
Method
- __construct public
- Method
- addAjax public
- Method
- enqueueMe public
- Method
- addListener public
- Method
- searchFieldListener public
- Method
- handleResponse protected
-
Handles the POST from the js
Assembles the POST_PARAMS into an array; calls the method spec'd in the 'command' keyed value; returns the DATA_ECHO
PageDom
Methods to build a Page DOM
-
Method
- __construct public
- Method
- addElement public
-
Adds Element to any given node or main DOMDoc
Paramstring $typeParamstring $classParamstring $idParam\DOMElement $parentParamstring $textParamstring $styleReturn\DOMElement
Method
- addRow public
-
Adds a single row with cells given in array
Param\DOMNode $table_nodeParamarray $cell_values Cell td valuesParamarray $cell_classes td classesParamstring $row_class tr classParamboolean $is_headingReturntype
Method
- addCell public
-
Add a single cell to a given row node
Param\DOMElement $row_nodeParamstring $cell_valueParamstring $cell_classParamboolean $is_heading
Method
- addKeyValueRows public
-
Given key-value pair array, builds rows with key cell and value cell
Paramarray $key_value_array Array of key-values, each a row in the tableParam\DOMElement $parent Node to which the rows are appendedParamstring $row_class Class name for each rowParamarray $row_id Row IDs, given as array with same count as key-valuesParamstring $key_class Class for the key cellsParamstring $value_class Class for the value cells
Method
- constructRowColumns protected
-
Paramarray $cell_array Index array of crm_value, label arraysParaminteger $columns Number of columns in rowParam\DOMElement $parent Node to which to add cellsParamstring $selected String for checking if value is selected
Method
- addSelectedClass protected
-
Adds the 'selected' class if the given node is selected
If the given node has a value that matches one of the given values,
add the 'selected' class to the node. Incoming values can be a string
or a semi-colon delineated array.
Param\DOMElement $node Node containing a valueParamstring $node_content Value displayed in the nodeParamstring $value Selections from the CRM to check against
Method
- addClassIdStyle public
- Method
- addAttribute public
-
Add an attribute to a given node
If attribute value is empty, does nothing. This prevents having to check for value at every call.
Paramstring $attr_typeParamstring $valueParam\DOMElement $node
Method
- getHTML public
-
Returns generated HTML string
Returnstring
Method
- getDOM public
-
Returns the complete DOMDocument
Return\DOMDocument
ProcessActionAbstract
-
Method
- __construct public
-
Processes the Add to Salesforce Action upon submission
Paramarray $action_settings Action Settings from form submissionParamstring $form_id Form ID of the submissionParamarray $data Data array of the form submission
Method
- processAction public
- Method
- getData public
-
Returns the $data from the form submission
May alter the data as needed for downstream actions
Returnarray
Method
- getMessages public
ZohoCampaignAPI_ResponseAnalysis
Description of ResponseAnalysis
-
Method
- __construct public
- Method
- analyzeSubscribeSubscriber public
-
Builds response array for subscribeSubscriber API request
Returnnull
Method
- analyzeGetSubscriberFields public
-
Builds response array for GetSubscriberFields API request
Returnnull
Method
- validateSubscriberFieldsStructure protected
-
Extracts and returns Subscriber Fields in configured expected array structure
Paramarray $json_arrayReturnarray
Method
- analyzeGetMailingLists public
-
Builds response array for GetSubscriberFields request
Returnnull
Method
- validateMailingListsStructure protected
-
Extracts and returns Mailing Lists in configured expected array structure
Paramarray $json_arrayReturnarray
Method
- initAndPerformErrorChecks protected
-
Reset Response Array and perform WP / API error checks
Paramstring $context To what this response refersReturnboolean Errors found or not
Method
- zohoErrorCodeCheck protected
-
Checks for rejection error code from Zoho
Returnboolean True if Zoho rejection, false if not Zoho rejection
Method
- wpErrorCheck protected
-
Sets wp_error and response code/body if not a WP Error
Detailed analysis can be done downstream
Paramarray|WP_Error $raw_response wp_remote_post complete response
Returnbool False if not WP Error, true if WP Error
Method
- timeStamp protected
- Stamps date/time Method
- resetResponseArrayDefaults protected
- Resets Response Array to default values Method
- addTroubleshootingGuidance protected
- Adds troubleshooting guidance keyed off message_support Method
- getResponse public
-
Returns Response Array after adding available troubleshooting guidance
Returnarray
ZohoCampaignAPI_ZohoCampaignAPI
Handles communication with Zoho Campaigns via Zoho's API
-
Method
- __construct public
- Method
- setURLValues protected
- Set endpoints, query parameters, and communication arguments Method
- build protected
-
Build a full API request URL
Paramstring $endpoint_keyParamarray $querystring_array Array of querystring parameter KEYSReturnstring
Method
- getSubscriberFields public
-
Makes API request to get Subscriber Fields
SeeZohoCampaignAPI/Config/SubscriberExpectedStructureReturnarray ZohoCampaignAPIResponseArray
Method
- getMailingLists public
-
Makes API request to get Mailing Lists
SeeZohoCampaignAPI/Config/MailingListsExpectedStructureReturnarray ZohoCampaignAPIResponseArray
Method
- subscribeSubscriber public
-
Subscribes a new email to a given list
Paramstring $list_key Key of the mailing list subscribing toParamstring $json_request JSON requestReturnarray Response ArraySeeZohoCampaignAPI/Config/ZohoCampaignAPIResponseArray.php
NFZohoCampaign
-
Static Method
- instance public
- Method
- __construct public
- Method
- setupLicense public
- Set up the licensing Method
- setupAdmin public
- Create the settings page Method
- registerMergeTags
- Method
- setEnqueueVersion protected
- Sets the mode as DEV (for development) or REL (in release)s Method
- instantiateConstants protected
-
Instantiate constants
Requires include because instantiation occurs before other classes
Method
- loadTools public
-
Loads standard tools
Retrieves injector each instantiation for dependencies of later classes inside this method
Method
- loadPrimaryClasses public
-
Loads primary classes available through NFZohoCampaign()->
Method
- loadLibraries protected
- Method
- loadFeatures protected
- Static Method
- config public
- Static Method
- template public
- Method
- autoloader public
-
Automatically includes files for classes with known filename structures
Paramstring $class_nameReturnnull
Method
- getInjector public
-
Assembles array of injector values and returns them
Some injector values may not be available depending on when called by dependent so watch for timing to ensure depending isn't called before value is ready
Only adds values that are set; thus if a value is requested of the injector before it is set, the error appears in the requesting location, not here. This helps debug timing.
Returnarray
Method
- NFZohoCampaign /** * The main function responsible for returning NFZohoCampaign * Instance to functions everywhere. * * @since 3.0 * @return NFZohoCampaign Highlander Instance */