SLP_Premier_URL_Control
extends SLPlus_BaseClass_Object
in package
Class SLP_Premier_URL_Control
Table of Contents
Properties
- $addon : object
- $myslp : MySLP
- $slplus : SLPlus
- $uses_myslp : bool
- $uses_slplus : bool
- $slug : mixed
Methods
- __construct() : mixed
- __get() : SLPlus_BaseClass_Object
- __isset() : bool
- change_result_limit() : array<string|int, mixed>
- Change the search results limit for 'standard_location_search'
- get_instance() : static
- Return an instance of the object which is also registered to the slplus global less the SLP_ part.
- handle_location_in_url() : array<string|int, mixed>
- UI Processing: set the active_location option
- remove_distance_qualifier() : array<string|int, mixed>|void
- AJAX Processing: Drop the distance qualifier when using the location ID.
- set_center_map_to_location() : string|void
- UI Processing: Set the map center to the incoming location lat/lng.
- set_location_limits() : string|void
- Set a location limit via URL controls.
- set_properties() : mixed
- Set our properties.
- initialize() : mixed
- Our Startup Stuff
- get_location_from_url() : int
- Get the location from the URL.
- post_matches_url_location() : bool
- AJAX Processing: Are we looking at a search form post whose params matches our active location URL?
Properties
$addon
public
object
$addon
$myslp
public
MySLP
$myslp
$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
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
boolchange_result_limit()
Change the search results limit for 'standard_location_search'
public
change_result_limit([array<string|int, mixed> $query_params = null ][, string $query_slug = null ]) : array<string|int, mixed>
Parameters
- $query_params : array<string|int, mixed> = null
- $query_slug : string = null
Return values
array<string|int, mixed> —modified array assumes param #4 = the limit
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
statichandle_location_in_url()
UI Processing: set the active_location option
public
handle_location_in_url(array<string|int, mixed> $options) : array<string|int, mixed>
Parameters
- $options : array<string|int, mixed>
-
the options going to the SLP JS handler
Return values
array<string|int, mixed>remove_distance_qualifier()
AJAX Processing: Drop the distance qualifier when using the location ID.
public
remove_distance_qualifier([null $having_clauses = null ]) : array<string|int, mixed>|void
Parameters
- $having_clauses : null = null
Return values
array<string|int, mixed>|voidset_center_map_to_location()
UI Processing: Set the map center to the incoming location lat/lng.
public
set_center_map_to_location([string|null $options = null ]) : string|void
Dual purpose - sets the filter AND processes the filter.
Parameters
- $options : string|null = null
-
default (null) - add the filter, array incoming means processing filter override of options
Return values
string|voidset_location_limits()
Set a location limit via URL controls.
public
set_location_limits([string|null $options = null ]) : string|void
Dual purpose - sets the filter AND processes the filter.
Parameters
- $options : string|null = null
-
default (null) - add the filter, array incoming means processing filter override of options
Return values
string|voidset_properties()
Set our properties.
public
set_properties([array<string|int, mixed> $options = array() ]) : mixed
Parameters
- $options : array<string|int, mixed> = array()
initialize()
Our Startup Stuff
protected
initialize() : mixed
get_location_from_url()
Get the location from the URL.
private
get_location_from_url() : int
Return values
int —0 if not a location, int > 0 if a valid location.
post_matches_url_location()
AJAX Processing: Are we looking at a search form post whose params matches our active location URL?
private
post_matches_url_location() : bool