SLP_Option
extends SLPlus_BaseClass_Object
in package
A single Smart Option object that is setup via things like SLP_SmartOptions.
Remember only private properties are run through the __get(), __set(), and __isset() magic methods.
Tags
Table of Contents
Properties
- $add_to_settings_tab : mixed
- $addon : object
- $allow_empty : mixed
- $call_when_changed : mixed
- $call_when_time : mixed
- $classes : mixed
- $default : mixed
- $force_change : mixed
- $get_item_callback : array<string|int, mixed>
- $get_items_callback : mixed
- $is_text : mixed
- $myslp : MySLP
- $options : mixed
- $related_to : mixed
- $show_label : mixed
- $slplus : SLPlus
- $slug : mixed
- $type : mixed
- $use_in_javascript : mixed
- $uses_myslp : bool
- $uses_slplus : bool
- $description : mixed
- $group : mixed
- $initial_value : mixed
- $is_false : mixed
- $is_true : mixed
- $label : mixed
- $page : mixed
- $section : mixed
- $value : mixed
Methods
- __construct() : mixed
- __get() : mixed
- Get the value, running it through a filter. "Magic method".
- __isset() : bool
- Allow isset to be called on private properties. "Magic method".
- __set() : SLP_Option|null
- Allow value to be set directly. "Magic method".
- __toString() : string
- To String. "Magic method", what to do when asked to output this object.
- get_instance() : static
- Return an instance of the object which is also registered to the slplus global less the SLP_ part.
- set_properties() : mixed
- Set our properties.
- initialize() : mixed
- Do these things when this object is invoked. Override in your class.
Properties
$add_to_settings_tab
public
mixed
$add_to_settings_tab
= \true
$addon
public
object
$addon
$allow_empty
public
mixed
$allow_empty
= \false
$call_when_changed
public
mixed
$call_when_changed
= \null
$call_when_time
public
mixed
$call_when_time
= \null
$classes
public
mixed
$classes
= array()
$default
public
mixed
$default
= ''
$force_change
public
mixed
$force_change
= \false
$get_item_callback
public
array<string|int, mixed>
$get_item_callback
object and method in typical array(
$get_items_callback
public
mixed
$get_items_callback
$is_text
public
mixed
$is_text
= \false
$myslp
public
MySLP
$myslp
$options
public
mixed
$options
$related_to
public
mixed
$related_to
$show_label
public
mixed
$show_label
= \true
$slplus
public
SLPlus
$slplus
$slug
public
mixed
$slug
$type
public
mixed
$type
= 'text'
$use_in_javascript
public
mixed
$use_in_javascript
= \false
$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.
$description
private
mixed
$description
$group
private
mixed
$group
$initial_value
private
mixed
$initial_value
$is_false
private
mixed
$is_false
$is_true
private
mixed
$is_true
$label
private
mixed
$label
$page
private
mixed
$page
$section
private
mixed
$section
$value
private
mixed
$value
Methods
__construct()
public
__construct([array<string|int, mixed> $options = array() ]) : mixed
Parameters
- $options : array<string|int, mixed> = array()
__get()
Get the value, running it through a filter. "Magic method".
public
__get(string $property) : mixed
Parameters
- $property : string
Return values
mixed —null if not set or the value
__isset()
Allow isset to be called on private properties. "Magic method".
public
__isset(mixed $property) : bool
Parameters
- $property : mixed
Return values
bool__set()
Allow value to be set directly. "Magic method".
public
__set(mixed $property, mixed $value) : SLP_Option|null
Parameters
- $property : mixed
- $value : mixed
Return values
SLP_Option|null__toString()
To String. "Magic method", what to do when asked to output this object.
public
__toString() : string
..
Return values
string —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
staticset_properties()
Set our properties.
public
set_properties([array<string|int, mixed> $options = array() ]) : mixed
Parameters
- $options : array<string|int, mixed> = array()
initialize()
Do these things when this object is invoked. Override in your class.
protected
initialize() : mixed