SLP_Premier_AJAX_Pagination
extends SLPlus_BaseClass_Object
in package
Holds the ajax-only code.
This allows the main plugin to only include this file in AJAX mode via the slp_init when DOING_AJAX is true.
Table of Contents
Properties
- $addon : mixed
- $myslp : MySLP
- $slplus : SLPlus
- $uses_myslp : bool
- $uses_slplus : bool
- $slug : mixed
Methods
- __construct() : mixed
- __get() : SLPlus_BaseClass_Object
- __isset() : bool
- add_sql_param_for_pagination() : array<string|int, mixed>
- Add the SQL offset parameter for pagination.
- get_instance() : static
- Return an instance of the object which is also registered to the slplus global less the SLP_ part.
- initialize() : mixed
- Initialize
- modify_ajax_response() : mixed
- Modify the AJAX response.
- modify_sql_for_pagination() : string
- Modify the SQL query to handle pagination.
- set_properties() : mixed
- Set our properties.
- create_pagination_block() : string
- Create the pagination block.
- get_primary_query() : mixed
- Get the primary data query from the AJAX query array.
Properties
$addon
public
mixed
$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
booladd_sql_param_for_pagination()
Add the SQL offset parameter for pagination.
public
add_sql_param_for_pagination(mixed $params) : array<string|int, mixed>
Parameters
- $params : mixed
Return values
array<string|int, mixed>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
staticinitialize()
Initialize
public
final initialize() : mixed
modify_ajax_response()
Modify the AJAX response.
public
modify_ajax_response(mixed $response_array) : mixed
Parameters
- $response_array : mixed
modify_sql_for_pagination()
Modify the SQL query to handle pagination.
public
modify_sql_for_pagination(mixed $sql_query) : string
This is called when someone clicks on a page number or forward/backward in the results display.
Parameters
- $sql_query : mixed
Return values
stringset_properties()
Set our properties.
public
set_properties([array<string|int, mixed> $options = array() ]) : mixed
Parameters
- $options : array<string|int, mixed> = array()
create_pagination_block()
Create the pagination block.
private
create_pagination_block(mixed $response_array) : string
Parameters
- $response_array : mixed
Return values
stringget_primary_query()
Get the primary data query from the AJAX query array.
private
get_primary_query(mixed $data_queries) : mixed
Parameters
- $data_queries : mixed