SLP_Admin_Locations
extends WP_List_Table
in package
Store Locator Plus manage locations admin user interface.
Table of Contents
Properties
- $active_columns : mixed
- $addingLocation : bool
- $baseAdminURL : mixed
- $cleanAdminURl : string
- $cleanURL : string
- $columns : mixed
- $current_action : mixed
- $empty_columns : array<string|int, mixed>
- $hangoverURL : mixed
- $settings : SLP_Settings
- $buttons : mixed
- $cleanAdminURL : mixed
- $db_orderbyfield : mixed
- $extra_location_filters : mixed
- $rest_grid_filter_logic : string
- $rest_grid_filters : array<string|int, mixed>
- $rest_grid_quick_filter_fields : array<string|int, mixed>
- $rest_grid_quick_filter_logic : string
- $rest_grid_quick_filter_values : array<string|int, mixed>
- $rest_request : bool
- $script_data : mixed
- $searchingFor : mixed
- $searchingForSomething : mixed
- $slplus : mixed
- $sort_order : mixed
- $start : mixed
- $total_locations_shown : mixed
Methods
- __construct() : mixed
- SLP_Admin_Locations constructor.
- add_extended_data_to_active_columns() : array<string|int, mixed>
- Adds the extended data columns.
- add_notice() : void
- Add a notification for JavaScript.
- add_private_location_css() : string
- Add the private class to locations marked private.
- addListLocationsSetting() : mixed
- Attach the HTML for the manage locations panel to the settings object as a new section.
- addLocationAddForm() : void
- Returns the string that is the Location Info Form guts.
- addLocationCardsSetting() : void
- Attach the card-based locations view as a section beside the locations list.
- configure_for_rest() : void
- Configure this screen object from an authenticated REST management request.
- create_settings_section_Import() : void
- Import panel only if Power not active.
- customize_location_list_displayed_data() : string
- Customize the data displayed to the user in the location list.
- display() : void
- Output the manage locations admin page.
- filter_InvalidHighlight() : string
- Set the invalid highlighting class.
- filter_rest_grid_where() : string
- Apply the MUI column and quick-filter models to validated location fields.
- get_column_info() : array<string|int, mixed>
- Get a list of all, hidden and sortable columns, with filter applied
- get_columns() : mixed
- Set the columns we will render on the manage locations page.
- get_instance() : SLPlus_BaseClass_Object
- Return an instance of the object which is also registered to the slplus global less the SLP_ part.
- get_locations_for_rest() : array<string|int, mixed>
- Return structured rows and column metadata for the React locations grid.
- set_active_columns() : mixed
- Get the extended columns meta data and remember them within this class.
- set_location_filter() : string
- Add the location filter.
- set_location_order() : mixed
- Set the locations query order by SQL command.
- create_object_settings() : void
- Create and attach settings.
- create_string_image_html() : string
- Create an HTML image.
- create_string_locations_grid_start() : string
- Start the locations grid panel.
- enqueue_scripts() : void
- Enqueue the location management scripts and CSS.
- get_actions_for_rest() : array<string|int, mixed>
- Return structured row actions after module filters run.
- get_rest_grid_filter_clause() : string
- Convert a validated DataGrid filter to a SQL clause.
- is_rest_query_field() : bool
- Return true when a column maps to a real base or extended-data field.
- set_CurrentAction() : void
- Set the current action being executed by the plugin.
- set_location_query() : void
- Set all the properties that manage the location query.
- set_search_filter() : string
- Set the search filter (where clause) if the searchfor field comes in via the form post.
- set_urls() : void
- Set our URL properties.
- setup_action_buttons() : void
- Setup the action buttons.
Properties
$active_columns
public
mixed
$active_columns
$addingLocation
public
bool
$addingLocation
Adding a location? (default: false)
$baseAdminURL
public
mixed
$baseAdminURL
= ''
$cleanAdminURl read-only
public
string
$cleanAdminURl
$cleanURL read-only
public
string
$cleanURL
The current request URL without order by or sorting parameters.
$columns
public
mixed
$columns
= array()
$current_action
public
mixed
$current_action
$empty_columns read-only
public
array<string|int, mixed>
$empty_columns
A list of empty column field IDs. key is the field name, value is the column title
$hangoverURL
public
mixed
$hangoverURL
= ''
$settings
public
SLP_Settings
$settings
$buttons
private
mixed
$buttons
$cleanAdminURL
private
mixed
$cleanAdminURL
= ''
$db_orderbyfield
private
mixed
$db_orderbyfield
= 'sl_store'
$extra_location_filters
private
mixed
$extra_location_filters
= ''
$rest_grid_filter_logic
private
string
$rest_grid_filter_logic
= 'and'
$rest_grid_filters
private
array<string|int, mixed>
$rest_grid_filters
= array()
$rest_grid_quick_filter_fields
private
array<string|int, mixed>
$rest_grid_quick_filter_fields
= array()
$rest_grid_quick_filter_logic
private
string
$rest_grid_quick_filter_logic
= 'and'
$rest_grid_quick_filter_values
private
array<string|int, mixed>
$rest_grid_quick_filter_values
= array()
$rest_request
private
bool
$rest_request
= \false
$script_data
private
mixed
$script_data
= array('all_displayed' => \true, 'locations' => array(), 'notices' => array())
$searchingFor
private
mixed
$searchingFor
= ''
$searchingForSomething
private
mixed
$searchingForSomething
= \false
$slplus
private
mixed
$slplus
$sort_order
private
mixed
$sort_order
= 'asc'
$start
private
mixed
$start
= 0
$total_locations_shown
private
mixed
$total_locations_shown
= 0
Methods
__construct()
SLP_Admin_Locations constructor.
public
__construct([array<string|int, mixed> $args = array() ]) : mixed
Parameters
- $args : array<string|int, mixed> = array()
add_extended_data_to_active_columns()
Adds the extended data columns.
public
add_extended_data_to_active_columns(array<string|int, mixed> $current_cols) : array<string|int, mixed>
Parameters
- $current_cols : array<string|int, mixed>
-
The current columns
Return values
array<string|int, mixed>add_notice()
Add a notification for JavaScript.
public
add_notice(string $message) : void
Parameters
- $message : string
add_private_location_css()
Add the private class to locations marked private.
public
add_private_location_css(string $class) : string
Parameters
- $class : string
-
the current class string for the manage locations location entry.
Return values
string —the modified CSS class with private attached if warranted.
addListLocationsSetting()
Attach the HTML for the manage locations panel to the settings object as a new section.
public
addListLocationsSetting() : mixed
This will be rendered via the render_adminpage method via the standard wpCSL Settings object display method.
addLocationAddForm()
Returns the string that is the Location Info Form guts.
public
addLocationAddForm() : void
addLocationCardsSetting()
Attach the card-based locations view as a section beside the locations list.
public
addLocationCardsSetting() : void
configure_for_rest()
Configure this screen object from an authenticated REST management request.
public
configure_for_rest(array<string|int, mixed> $params) : void
Parameters
- $params : array<string|int, mixed>
create_settings_section_Import()
Import panel only if Power not active.
public
create_settings_section_Import() : void
customize_location_list_displayed_data()
Customize the data displayed to the user in the location list.
public
customize_location_list_displayed_data(string $data, string $slug, string $label) : string
Parameters
- $data : string
- $slug : string
- $label : string
Tags
Return values
stringdisplay()
Output the manage locations admin page.
public
display() : void
filter_InvalidHighlight()
Set the invalid highlighting class.
public
filter_InvalidHighlight(string $class) : string
Parameters
- $class : string
Return values
string —the new class name for invalid rows
filter_rest_grid_where()
Apply the MUI column and quick-filter models to validated location fields.
public
filter_rest_grid_where(string $where) : string
Parameters
- $where : string
Return values
stringget_column_info()
Get a list of all, hidden and sortable columns, with filter applied
public
get_column_info() : array<string|int, mixed>
Return values
array<string|int, mixed>get_columns()
Set the columns we will render on the manage locations page.
public
get_columns() : mixed
Tags
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() ]) : SLPlus_BaseClass_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_Objectget_locations_for_rest()
Return structured rows and column metadata for the React locations grid.
public
get_locations_for_rest(int $per_page, int $page) : array<string|int, mixed>
Parameters
- $per_page : int
- $page : int
Tags
Return values
array<string|int, mixed>set_active_columns()
Get the extended columns meta data and remember them within this class.
public
set_active_columns() : mixed
set_location_filter()
Add the location filter.
public
set_location_filter(mixed $where) : string
Parameters
- $where : mixed
Return values
stringset_location_order()
Set the locations query order by SQL command.
public
set_location_order(mixed $current_order_array) : mixed
Parameters
- $current_order_array : mixed
create_object_settings()
Create and attach settings.
private
create_object_settings() : void
Tags
create_string_image_html()
Create an HTML image.
private
create_string_image_html(string $image_source[, string $title = '' ]) : string
Parameters
- $image_source : string
-
The image source.
- $title : string = ''
-
The title for the image.
Return values
stringcreate_string_locations_grid_start()
Start the locations grid panel.
private
create_string_locations_grid_start() : string
Return values
stringenqueue_scripts()
Enqueue the location management scripts and CSS.
private
enqueue_scripts() : void
get_actions_for_rest()
Return structured row actions after module filters run.
private
get_actions_for_rest() : array<string|int, mixed>
Return values
array<string|int, mixed>get_rest_grid_filter_clause()
Convert a validated DataGrid filter to a SQL clause.
private
get_rest_grid_filter_clause(array<string|int, mixed> $filter) : string
Parameters
- $filter : array<string|int, mixed>
Return values
stringis_rest_query_field()
Return true when a column maps to a real base or extended-data field.
private
is_rest_query_field(string $field) : bool
Parameters
- $field : string
Return values
boolset_CurrentAction()
Set the current action being executed by the plugin.
private
set_CurrentAction() : void
set_location_query()
Set all the properties that manage the location query.
private
set_location_query() : void
Tags
set_search_filter()
Set the search filter (where clause) if the searchfor field comes in via the form post.
private
set_search_filter() : string
Return values
stringset_urls()
Set our URL properties.
private
set_urls() : void
setup_action_buttons()
Setup the action buttons.
private
setup_action_buttons() : void