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 : SLPPower
- $addon : mixed
- $filter_active : bool
- $filter_active : mixed
- $reset : bool
- $reset : mixed
- $slplus : SLPlus
- $uses_slplus : bool
- $slplus : mixed
- $uses_slplus : 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
- createstring_FilterInput() : string
- Create an input field on the export locations filter page with a div wrapper.
- createstring_FilterJoinWith() : string
- Create the AND/OR logic joiner for export filters.
- createstring_LocationFilterForm() : mixed
- Create the location filter form for export filters.
- createstring_LocationPropertyDropdown() : string
- Create the HTML string for a state selection drop down from the data tables.
- 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() : SLPlus_BaseClass_Object
- 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() : mixed
- Set our properties.
Properties
$addon
public
SLPPower
$addon
$addon
public
mixed
$addon
$filter_active
public
bool
$filter_active
True if a filter is active.
$filter_active
public
mixed
$filter_active
= \false
$reset
public
bool
$reset
If true, reset the filters.
$reset
public
mixed
$reset
= \false
$slplus
public
SLPlus
$slplus
$uses_slplus
public
bool
$uses_slplus
Set to true (default) if the object needs access to the SLPlus plugin object.
$slplus
protected
mixed
$slplus
$uses_slplus
protected
mixed
$uses_slplus
= \true
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
stringcreatestring_FilterInput()
Create an input field on the export locations filter page with a div wrapper.
public
createstring_FilterInput(string $field_name[, string $placeholder = '' ][, string $label = '' ][, bool $joiner = true ]) : string
Parameters
- $field_name : string
-
field name and ID
- $placeholder : string = ''
-
placeholder text, defaults to ''
- $label : string = ''
- $joiner : bool = true
Return values
string —HTML for the input field and wrapping div
createstring_FilterJoinWith()
Create the AND/OR logic joiner for export filters.
public
createstring_FilterJoinWith(string $field_name) : string
Parameters
- $field_name : string
-
the field name and ID
Return values
string —HTML for the filter field "joiner" selector
createstring_LocationFilterForm()
Create the location filter form for export filters.
public
createstring_LocationFilterForm() : mixed
Tags
createstring_LocationPropertyDropdown()
Create the HTML string for a state selection drop down from the data tables.
public
createstring_LocationPropertyDropdown([string $location_property = 'state' ][, mixed $joiner = true ]) : string
Parameters
- $location_property : string = 'state'
-
- which location property to use to build the drop down options
- $joiner : mixed = true
Return values
string —the HTML for the drop down menu.
filter_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( $where) : string
Parameters
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() ]) : SLPlus_BaseClass_Object
TODO: PHP7.4 and PHP8.0 the static instance variable returns an object matching $class TODO: PHP8.1 the static instance continually returns the FIRST object (SLP_Admin_Helper) every time -- it is like PHP8.1 static instance is bound to base_class-object versus the calling class object
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
SLPlus_BaseClass_Objectinitialize()
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() ]) : mixed
Parameters
- $options : array<string|int, mixed> = array()