Store Locator Plus®

SLP_Power_Category_Selector_Manager extends SLPlus_BaseClass_Object
in package

Manage the category selectors.

Table of Contents

Properties

$addon  : SLPPower
$addon  : mixed
$categoryDropDowns  : array<string|int, mixed>
$node_level  : int
$selectors  : array<string|int, SLP_Power_Category_Selector>
$selectors  : mixed
$slplus  : SLPlus
$uses_slplus  : bool
$slplus  : mixed
$uses_slplus  : mixed
$categoryDropDowns  : mixed
$node_level  : mixed

Methods

__construct()  : mixed
__get()  : SLPlus_BaseClass_Object
__isset()  : bool
create_string_dropdown_div()  : string
Create the div-wrapped HTML with label for the category selector.
get_html()  : mixed
Return the UI HTML for the named selector.
get_instance()  : SLPlus_BaseClass_Object
Return an instance of the object which is also registered to the slplus global less the SLP_ part.
get_selectors()  : array<string|int, mixed>
Return the selectors as a named array or object array.
initialize()  : mixed
Initialize the manager.
set_properties()  : mixed
Set our properties.
create_default_selectors()  : mixed
Create the default selectors.
create_dropdown_for_category()  : null
Create a drop down object for all items with a parent category as specified.
create_string_cascading_category_dropdown()  : mixed
Create a cascading drop down array for location categories.
create_string_for_cascade_selector()  : string
Create the HTML output string for the single selector type.
create_string_for_single_selector()  : string
Create the HTML output string for the single selector type.
create_string_nested_dropdown_divs()  : string
Create nested divs with the drop down menus within.

Properties

$uses_slplus

public bool $uses_slplus

Set to true (default) if the object needs access to the SLPlus plugin object.

Methods

__construct()

public __construct([array<string|int, mixed> $options = array() ]) : mixed
Parameters
$options : array<string|int, mixed> = array()

__isset()

public __isset(string $property) : bool
Parameters
$property : string
Return values
bool

create_string_dropdown_div()

Create the div-wrapped HTML with label for the category selector.

public create_string_dropdown_div(string $dropdown_html[, int $term_id = 0 ]) : string
Parameters
$dropdown_html : string
$term_id : int = 0
Return values
string

get_html()

Return the UI HTML for the named selector.

public get_html(string $selector_slug, bool $has_label) : mixed
Parameters
$selector_slug : string
$has_label : bool
Tags
used-by

\SLP_Power_UI::create_string_category_selector

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

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_Object

get_selectors()

Return the selectors as a named array or object array.

public get_selectors() : array<string|int, mixed>
Tags
used-by

\SLP_Power_Options::get_show_cats_on_search_items

Return values
array<string|int, mixed>

set_properties()

Set our properties.

public set_properties([array<string|int, mixed> $options = array() ]) : mixed
Parameters
$options : array<string|int, mixed> = array()

create_default_selectors()

Create the default selectors.

private create_default_selectors() : mixed
Tags
uses
create_string_for_cascade_selector()
uses
create_string_for_single_selector()

create_dropdown_for_category()

Create a drop down object for all items with a parent category as specified.

private create_dropdown_for_category(string $parent_cat[, mixed $grandparent_cat = null ]) : null

Recursive, calls the same method for each child.

Parameters
$parent_cat : string

the parent category (int)

$grandparent_cat : mixed = null

the grandparent category (int) or null

Return values
null

create_string_cascading_category_dropdown()

Create a cascading drop down array for location categories.

private create_string_cascading_category_dropdown() : mixed

create_string_for_cascade_selector()

Create the HTML output string for the single selector type.

private create_string_for_cascade_selector(bool $has_label) : string
Parameters
$has_label : bool
Tags
used-by

create_default_selectors()

Return values
string

create_string_for_single_selector()

Create the HTML output string for the single selector type.

private create_string_for_single_selector(bool $has_label) : string

Called via the call_user_func() in get_html().

Parameters
$has_label : bool
Tags
used-by

create_default_selectors()

Return values
string

create_string_nested_dropdown_divs()

Create nested divs with the drop down menus within.

private create_string_nested_dropdown_divs(string $parent_category_id) : string
Parameters
$parent_category_id : string

(int)

Return values
string

        
On this page

Search results