class GridState_Data (View source)

Simple set of data, similar to stdClass, but without the notice-level errors.

Methods

__construct($data = [])

No description

__get($name)

No description

__call($name, $arguments)

No description

__clone()

No description

void
initDefaults(array $defaults)

Initialise the defaults values for the grid field state These values won't be included in getChangesArray()

mixed
getData(string $name, mixed $default = null)

Retrieve the value for the given key

__set($name, $value)

No description

__isset($name)

No description

__unset($name)

No description

__toString()

No description

toArray()

Return all data, including defaults, as array

array
getChangesArray()

Convert the state to an array including only value that differ from the default state defined by initDefaults()

Details

__construct($data = [])

Parameters

$data

__get($name)

Parameters

$name

__call($name, $arguments)

Parameters

$name
$arguments

__clone()

void initDefaults(array $defaults)

Initialise the defaults values for the grid field state These values won't be included in getChangesArray()

Parameters

array $defaults

Return Value

void

mixed getData(string $name, mixed $default = null)

Retrieve the value for the given key

Parameters

string $name

The name of the value to retrieve

mixed $default

Default value to assign if not set. Note that this will be included in getChangesArray()

Return Value

mixed

The value associated with this key, or the value specified by $default if not set

__set($name, $value)

Parameters

$name
$value

__isset($name)

Parameters

$name

__unset($name)

Parameters

$name

__toString()

toArray()

Return all data, including defaults, as array

array getChangesArray()

Convert the state to an array including only value that differ from the default state defined by initDefaults()

Return Value

array