SLP_Power_Admin_Locations_Import
extends SLP_Object_With_Objects
in package
Configure the React-driven Admin / Locations / Import interface.
Table of Contents
Constants
- script_handle : mixed = 'slppower_location_import'
- subtab_slug : mixed = 'import'
Properties
- $addon : object
- $class_prefix : string
- $dir : string
- $myslp : MySLP
- $objects : array<string|int, mixed>
- $slplus : SLPlus
- $uses_myslp : bool
- $uses_slplus : bool
- $slug : mixed
- $settings : SLP_Settings
Methods
- __construct() : mixed
- __get() : mixed
- Get the value, running it through a filter.
- __isset() : bool
- Allow isset to be called on private properties.
- add_object() : mixed
- create_import_subtab() : void
- Add the React location import panel.
- get_instance() : static
- Return an instance of the object which is also registered to the slplus global less the SLP_ part.
- instantiate() : null|object
- Instantiate an object of the noted class.
- set_properties() : void
- Set our properties.
- at_startup() : mixed
- Things to do at startup after this baby is initialized. Override in your class.
- initialize() : void
- Connect our addon.
- set_default_object_options() : mixed
- Set default options for objects. Override in your class.
- enqueue_react_interface() : void
- Enqueue the compiled React interface and its bootstrap data.
- get_vars_for_react() : array<string, mixed>
- Build the initial location import state for React.
Constants
script_handle
public
mixed
script_handle
= 'slppower_location_import'
subtab_slug
public
mixed
subtab_slug
= 'import'
Properties
$addon
public
object
$addon
$class_prefix
public
string
$class_prefix
the prefix that goes before all our classes
$dir
public
string
$dir
the root directory for this theme
$myslp
public
MySLP
$myslp
$objects
public
array<string|int, mixed>
$objects
key = class name, array of attributes() auto_instantiate = true , instantiate the object when this object initializes object = the instantiated object options = default startup options subdir = the subdirectory (from theme root) that contains the class definition
$slplus
public
SLPlus
$slplus
$uses_myslp
public
bool
$uses_myslp
Set to true to add a $myslp property pointing to global $myslp
$uses_slplus
public
bool
$uses_slplus
Set to true (default) if the object needs access to the SLPlus plugin object.
$slug
protected
mixed
$slug
$settings
private
SLP_Settings
$settings
Methods
__construct()
public
__construct([array<string|int, mixed> $options = array() ]) : mixed
Parameters
- $options : array<string|int, mixed> = array()
__get()
Get the value, running it through a filter.
public
__get(string $property) : mixed
Parameters
- $property : string
Return values
mixed —null if not set or the value
__isset()
Allow isset to be called on private properties.
public
__isset(mixed $property) : bool
Parameters
- $property : mixed
Return values
booladd_object()
public
add_object(mixed $object) : mixed
Parameters
- $object : mixed
create_import_subtab()
Add the React location import panel.
public
create_import_subtab(SLP_Settings $settings) : void
Parameters
- $settings : SLP_Settings
-
Settings page instance.
get_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
staticinstantiate()
Instantiate an object of the noted class.
public
instantiate(string $class[, array<string|int, mixed> $options = array() ]) : null|object
Parameters
- $class : string
- $options : array<string|int, mixed> = array()
Return values
null|objectset_properties()
Set our properties.
public
set_properties([array<string|int, mixed> $options = array() ]) : void
Parameters
- $options : array<string|int, mixed> = array()
at_startup()
Things to do at startup after this baby is initialized. Override in your class.
protected
at_startup() : mixed
NOTE: this will not run at initialization if $this->objects is empty.
initialize()
Connect our addon.
protected
final initialize() : void
set_default_object_options()
Set default options for objects. Override in your class.
protected
set_default_object_options() : mixed
enqueue_react_interface()
Enqueue the compiled React interface and its bootstrap data.
private
enqueue_react_interface() : void
get_vars_for_react()
Build the initial location import state for React.
private
get_vars_for_react() : array<string, mixed>