class GridState_Data (View source)

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

Properties

protected array $data
protected $defaults

Methods

public
__construct($data = [])

No description

public
__get($name)

No description

public
__call($name, $arguments)

No description

public
__clone()

No description

public
void
initDefaults(array $defaults)

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

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

Retrieve the value for the given key

public
__set($name, $value)

No description

public
__isset($name)

No description

public
__unset($name)

No description

public
__toString()

No description

public
toArray()

Return all data, including defaults, as array

public
array
getChangesArray()

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

Details

__construct($data = [])

No description

Parameters

$data

__get($name)

No description

Parameters

$name

__call($name, $arguments)

No description

Parameters

$name
$arguments

__clone()

No description

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)

No description

Parameters

$name
$value

__isset($name)

No description

Parameters

$name

__unset($name)

No description

Parameters

$name

__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()

Return Value

array