SLP® phpDocs

SLP_Premier_Admin_Locations extends SLP_Object_With_Objects
in package

Class SLP_Premier_Admin_Locations

The things that modify the Admin / Locations interface.

Table of Contents

Properties

$addon  : mixed
$class_prefix  : string
$dir  : string
$location_import  : SLP_Premier_LocationImport
$myslp  : MySLP
$objects  : array<string|int, mixed>
$slplus  : SLPlus
$territory  : mixed
$uses_myslp  : bool
$uses_slplus  : bool
$slug  : mixed
$location_add  : mixed
$location_was_geocoded  : mixed
$territory_properties  : mixed

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
current_location_was_geocoded()  : mixed
The current location has been geocoded, rerun territory boundaries.
extend_add_locations_form()  : mixed
Map aliases for field names.
get_instance()  : static
Return an instance of the object which is also registered to the slplus global less the SLP_ part.
initialize()  : mixed
Instantiate the admin experience object.
instantiate()  : null|object
Instantiate an object of the noted class.
save_territory_bounds()  : array<string|int, mixed>
Add the territory bounds to the extended data when it is updated/saved.
set_properties()  : mixed
Set our properties.
set_territory_bounds_on_import()  : void
Add the territory bounds for imported CSV data.
strip_sl_from_territory_fields()  : mixed
Set data properties without the leading 'sl_' added by Pro Pack import. WTF.
at_startup()  : mixed
At startup.
set_default_object_options()  : mixed
Set default options for objects. Override in your class.
create_object_location_add()  : void
Create and attach the location import object.
create_object_territory()  : void
Create and attach the location import object.

Properties

$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

$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.

$territory_properties

private mixed $territory_properties = array('territory_distance_unit', 'territory_distance_north', 'territory_distance_south', 'territory_distance_east', 'territory_distance_west')

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
bool

extend_add_locations_form()

Map aliases for field names.

public extend_add_locations_form(SLP_Settings $settings, array<string|int, array<string|int, mixed>> $group_params, array<string|int, array<string|int, mixed>> $data_field) : mixed
Parameters
$settings : SLP_Settings

SLP Settings Interface reference SLPlus->ManageLocations->settings

$group_params : array<string|int, array<string|int, mixed>>

The metadata needed to build a settings group.

$data_field : array<string|int, array<string|int, mixed>>

The current extended data field meta.

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
static

instantiate()

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|object

save_territory_bounds()

Add the territory bounds to the extended data when it is updated/saved.

public save_territory_bounds(array<string|int, mixed> $data, array<string|int, mixed> $current_data, array<string|int, mixed> $location_id) : array<string|int, mixed>
Parameters
$data : array<string|int, mixed>

The new data to be written.

$current_data : array<string|int, mixed>

The pre-existing extended data for this location, to be changed.

$location_id : array<string|int, mixed>

The ID of the location being updated.

Return values
array<string|int, mixed>

$data Revised data to be inserted.

set_properties()

Set our properties.

public set_properties([array<string|int, mixed> $options = array() ]) : mixed
Parameters
$options : array<string|int, mixed> = array()

set_territory_bounds_on_import()

Add the territory bounds for imported CSV data.

public set_territory_bounds_on_import(mixed $data) : void

POWER add-on uses AJAX for this.

Parameters
$data : mixed

strip_sl_from_territory_fields()

Set data properties without the leading 'sl_' added by Pro Pack import. WTF.

public strip_sl_from_territory_fields(mixed $data) : mixed
Parameters
$data : mixed

set_default_object_options()

Set default options for objects. Override in your class.

protected set_default_object_options() : mixed

create_object_location_add()

Create and attach the location import object.

private create_object_location_add() : void

        
On this page

Search results