SLP_Power_Admin_Location_Filters
extends SLPlus_BaseClass_Object
in package
Admin Filters on locations both UX side and BE database I/O side.
Table of Contents
Properties
- $addon : mixed
- $filter_active : mixed
- $myslp : MySLP
- $reset : mixed
- $slplus : SLPlus
- $uses_myslp : bool
- $uses_slplus : bool
- $slug : mixed
- $formdata : mixed
Methods
- __construct() : mixed
- __get() : SLPlus_BaseClass_Object
- __isset() : bool
- create_LocationSQLCommand() : array<string|int, mixed>
- Create the location selector SQL command with where clause parameters.
- createstring_FilterDisplay() : string
- extend_where_for_requested_categories() : string
- Extend the current where clause to include requested category IDs.
- filter_ExtendGetSQLWhere_Country() : string
- Add country filters to the SQL where clause.
- filter_ExtendGetSQLWhere_LocationIn() : string
- Add selected location filter to the SQL where clause.
- filter_ExtendGetSQLWhere_Name() : string
- Add name filters to the SQL where clause.
- filter_ExtendGetSQLWhere_State() : string
- Add state filters to the SQL where clause.
- filter_ExtendGetSQLWhere_Zip() : string
- Add zip filters to the SQL where clause.
- filter_locations_by_category() : string
- Extend the current where clause to also filter by the categories selected.
- get_instance() : static
- Return an instance of the object which is also registered to the slplus global less the SLP_ part.
- initialize() : mixed
- Initialize.
- modifystring_WildCardToSQLLike() : string
- Change wildcard strings to SQL Like Statements.
- reset() : mixed
- Reset the filter variables.
- set_properties() : void
- Set our properties.
- create_location_property_where() : string
- Build a location property where clause from one or more submitted filter values.
- get_requested_store_categories() : array<string|int, int>
- Get requested store category IDs from the filter request.
- normalize_filter_values() : array<string|int, string>
- Normalize scalar or array filter values.
Properties
$addon
public
mixed
$addon
$filter_active
public
mixed
$filter_active
= \false
$myslp
public
MySLP
$myslp
$reset
public
mixed
$reset
= \false
$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
$formdata
private
mixed
$formdata
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
boolcreate_LocationSQLCommand()
Create the location selector SQL command with where clause parameters.
public
create_LocationSQLCommand(array<string|int, mixed> $request_data) : array<string|int, mixed>
Parameters
- $request_data : array<string|int, mixed>
Return values
array<string|int, mixed> —string = sql command, string[] = where clause parameters
createstring_FilterDisplay()
public
createstring_FilterDisplay(string $HTML) : string
Parameters
- $HTML : string
Return values
stringextend_where_for_requested_categories()
Extend the current where clause to include requested category IDs.
public
extend_where_for_requested_categories(string $where) : string
Parameters
- $where : string
-
Current where clause.
Return values
stringfilter_ExtendGetSQLWhere_Country()
Add country filters to the SQL where clause.
public
filter_ExtendGetSQLWhere_Country(string $where) : string
Parameters
- $where : string
-
current where clause
Return values
stringfilter_ExtendGetSQLWhere_LocationIn()
Add selected location filter to the SQL where clause.
public
filter_ExtendGetSQLWhere_LocationIn(string $where) : string
Parameters
- $where : string
-
current where clause
Return values
stringfilter_ExtendGetSQLWhere_Name()
Add name filters to the SQL where clause.
public
filter_ExtendGetSQLWhere_Name(string $where) : string
Parameters
- $where : string
-
current where clause
Return values
stringfilter_ExtendGetSQLWhere_State()
Add state filters to the SQL where clause.
public
filter_ExtendGetSQLWhere_State(string $where) : string
Parameters
- $where : string
-
current where clause
Return values
stringfilter_ExtendGetSQLWhere_Zip()
Add zip filters to the SQL where clause.
public
filter_ExtendGetSQLWhere_Zip(string $where) : string
Parameters
- $where : string
-
current where clause
Return values
stringfilter_locations_by_category()
Extend the current where clause to also filter by the categories selected.
public
filter_locations_by_category(mixed $where) : string
Parameters
- $where : mixed
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
staticinitialize()
Initialize.
public
initialize() : mixed
modifystring_WildCardToSQLLike()
Change wildcard strings to SQL Like Statements.
public
modifystring_WildCardToSQLLike(string $wildcard_string) : string
Replace * with % in the string.
Parameters
- $wildcard_string : string
Return values
stringreset()
Reset the filter variables.
public
reset() : mixed
set_properties()
Set our properties.
public
set_properties([array<string|int, mixed> $options = array() ]) : void
Parameters
- $options : array<string|int, mixed> = array()
create_location_property_where()
Build a location property where clause from one or more submitted filter values.
private
create_location_property_where(string $where, string $field_name, string $formdata_key) : string
Parameters
- $where : string
-
Current where clause.
- $field_name : string
-
Location table field name.
- $formdata_key : string
-
Filter data key.
Return values
stringget_requested_store_categories()
Get requested store category IDs from the filter request.
private
get_requested_store_categories() : array<string|int, int>
Return values
array<string|int, int>normalize_filter_values()
Normalize scalar or array filter values.
private
normalize_filter_values(mixed $values) : array<string|int, string>
Parameters
- $values : mixed
-
Submitted filter values.