\DevOwl\RealCookieBanner\compRevisionContextDependingOption

Make a given option context-depending. That means, reading a option by a unique name reads the value of the option from the revision context. This also works for write.

Note: You need to refactor your update_option_{option} and option_{option} hooks to listen to all changes, perhaps with a startsWith().

Summary

Methods
Properties
Constants
__construct()
pre_option()
pre_update_option()
getOriginalOptionName()
getDefault()
No public properties found
No constants found
hooks()
getOptionName()
No protected properties found
N/A
No private methods found
$originalOptionName
$default
N/A

Properties

$originalOptionName

$originalOptionName :

Type

$default

$default :

Type

Methods

__construct()

__construct(string  $originalOptionName,mixed  $default)

C'tor.

Parameters

string $originalOptionName
mixed $default

pre_option()

pre_option(mixed  $pre_option,string  $option)

Read from original value.

Parameters

mixed $pre_option
string $option

pre_update_option()

pre_update_option(mixed  $value,mixed  $old_value,string  $option)

Redirect the update of the context.

Parameters

mixed $value

The new, unserialized option value.

mixed $old_value

The old option value.

string $option

Option name.

getOriginalOptionName()

getOriginalOptionName()

Get original option name.

getDefault()

getDefault()

Get default value.

hooks()

hooks()

Initialize hooks.

getOptionName()

getOptionName()

Get option name for this context.