SLP® phpDocs

SLP_Option extends SLPlus_BaseClass_Object

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
@property

null||callback $call_when_time the function to call when the cron time fires - gets $slug - executed with ->execute_cron_jobs

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

$call_when_changed

public mixed $call_when_changed = \null

$call_when_time

public mixed $call_when_time = \null

$force_change

public mixed $force_change = \false

$get_item_callback

public array<string|int, mixed> $get_item_callback

object and method in typical array( , ) format that returns an array of items.

$get_items_callback

public mixed $get_items_callback

$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.

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
static

set_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

        
On this page

Search results