MySLP_Contact_Us
extends SLP_Base_ReactObject
in package
MySLP_Contact_Us class manages the "Contact Us" page and related email functionality.
Table of Contents
Properties
- $addon : object
- $buildDir : string
- $buildURL : string
- $content : string|null
- $myslp : MySLP
- $notifications : array<string|int, mixed>
- $pageName : string
- $scriptAssetFile : string
- $scriptFile : string
- $scriptURL : string
- $slplus : SLPlus
- $subject : string|null
- $pluginDir : mixed
- $pluginURL : mixed
- $scriptFilebase : mixed
- $scriptHandle : mixed
- $slug : mixed
- $uses_myslp : bool
- $uses_slplus : mixed
- $wrapper_class : mixed
- $myslp_email_settings : array<string|int, mixed>
Methods
- __construct() : mixed
- __get() : SLPlus_BaseClass_Object
- __isset() : bool
- add_notification() : void
- Add Notification
- contact_form() : void
- Display an email contact form.
- email_tab_content() : void
- Render the tab content on Network Admin -> Email Settings
- extend_email_setting_tab() : array<string|int, mixed>
- Extend the tabs on Network Admin -> Email Settings
- extendReactVars() : array<string|int, mixed>
- Retrieves and modifies variables used for integration with React front-end.
- filter_email_type() : string
- Make text/html a valid mail type.
- get_instance() : static
- Return an instance of the object which is also registered to the slplus global less the SLP_ part.
- getCustomerMeta() : string
- render() : void
- Render admin page - default can be overriden.
- set_properties() : mixed
- Set our properties.
- enqueueReact() : void
- Things we normally want to do before each render
- get_vars_for_react() : array<string|int, mixed>
- Pass data from PHP to React JavaScript environment.
- initialize() : void
- Initialize the plugin by setting up hooks, filters, and actions.
- send_contact_email() : void
- Send the contact email.
- setup_vars() : void
- Set up our system vars.
Properties
$addon
public
object
$addon
$buildDir read-only
public
string
$buildDir
The build directory where the React script lives.
$buildURL read-only
public
string
$buildURL
The build URL where the React script lives.
$content
public
string|null
$content
= \null
$myslp
public
MySLP
$myslp
$notifications
public
array<string|int, mixed>
$notifications
= array()
$pageName
public
string
$pageName
The page name for React, update with initialize() override.
$scriptAssetFile read-only
public
string
$scriptAssetFile
The fully qualified file name for the React script supporting asset PHP file.
$scriptFile read-only
public
string
$scriptFile
The fully qualified file name for the React script.
$scriptURL read-only
public
string
$scriptURL
The URL for the React script.
$slplus
public
SLPlus
$slplus
$subject
public
string|null
$subject
= \null
$pluginDir
protected
mixed
$pluginDir
= \MYSLP_PLUGIN_DIR
$pluginURL
protected
mixed
$pluginURL
= \MYSLP_URL
$scriptFilebase
protected
mixed
$scriptFilebase
= 'contact_us'
$scriptHandle
protected
mixed
$scriptHandle
= 'contact_us'
$slug
protected
mixed
$slug
$uses_myslp
protected
bool
$uses_myslp
= \true
$uses_slplus
protected
mixed
$uses_slplus
= \true
$wrapper_class
protected
mixed
$wrapper_class
= 'react-wrapper contact-us-component'
$myslp_email_settings
private
array<string|int, mixed>
$myslp_email_settings
= array('default' => 'support@storelocatorplus.com')
Methods
__construct()
public
__construct([array<string|int, mixed> $options = array() ]) : mixed
Parameters
- $options : array<string|int, mixed> = array()
__get()
public
__get(string $property) : SLPlus_BaseClass_Object
Parameters
- $property : string
Return values
SLPlus_BaseClass_Object__isset()
public
__isset(string $property) : bool
Parameters
- $property : string
Return values
booladd_notification()
Add Notification
public
add_notification(string $severity, string $msg) : void
Parameters
- $severity : string
- $msg : string
contact_form()
Display an email contact form.
public
contact_form() : void
email_tab_content()
Render the tab content on Network Admin -> Email Settings
public
email_tab_content() : void
extend_email_setting_tab()
Extend the tabs on Network Admin -> Email Settings
public
extend_email_setting_tab(mixed $tabs) : array<string|int, mixed>
Parameters
- $tabs : mixed
Return values
array<string|int, mixed>extendReactVars()
Retrieves and modifies variables used for integration with React front-end.
public
extendReactVars(mixed $vars) : array<string|int, mixed>
Parameters
- $vars : mixed
Return values
array<string|int, mixed>filter_email_type()
Make text/html a valid mail type.
public
filter_email_type() : string
Return values
stringget_instance()
Return an instance of the object which is also registered to the slplus global less the SLP_ part.
public
static get_instance([bool $no_global = false ][, mixed $params = array() ]) : static
Parameters
- $no_global : bool = false
-
set to true to skip assigning object to SLP global as a property.
- $params : mixed = array()
-
object init params
Return values
staticgetCustomerMeta()
public
getCustomerMeta() : string
Return values
stringrender()
Render admin page - default can be overriden.
public
render() : void
Provide the DOM element where the React app will render: slp-full-page-react-app
set_properties()
Set our properties.
public
set_properties([array<string|int, mixed> $options = array() ]) : mixed
Parameters
- $options : array<string|int, mixed> = array()
enqueueReact()
Things we normally want to do before each render
protected
enqueueReact() : void
get_vars_for_react()
Pass data from PHP to React JavaScript environment.
protected
get_vars_for_react() : array<string|int, mixed>
Use this for one-time setup, things that are mostly static in PHP but you need to send to JS.
Return values
array<string|int, mixed>initialize()
Initialize the plugin by setting up hooks, filters, and actions.
protected
final initialize() : void
Tags
send_contact_email()
Send the contact email.
private
send_contact_email() : void
setup_vars()
Set up our system vars.
private
setup_vars() : void