class SizeStyle extends Style (View source)

Properties

protected string $name

The name of this style.

from  Style
protected string $variable

The name of the associated CSS variable.

from  Style

Methods

static string
getTypeFromClass(Style|object $class, string $suffix = 'Style')

Get the type handle of a given Style instance.

from  Style
$this
setName(string $name)

Set the name of this style.

from  Style
getName()

Get the name of this style.

from  Style
string
getDisplayName(string $format = 'html')

Get the display name for this style (localized and escaped accordingly to $format).

from  Style
$this
setVariable(string $variable)

Set the name of the associated CSS variable.

from  Style
getVariable()

Get the name of the associated CSS variable.

from  Style
getVariableToInspect()

Gets the name of the CSS variable we should use to inspect the data collection AND write into the request data collection. The reason for this is because the new customizer just has a unified approach to this –whereas the old customizer made you define the name of the variable in the xml file as page-background and reference it with page-background-color in the variable collections.

from  Style
jsonSerialize()

No description

from  Style
static Value[]
getValuesFromVariables(mixed $rules)

No description

from  Style
ValueInterface|null
ValueInterface|null
createValueFromRequestDataCollection(array $styles)

No description

VariableInterface|null
createVariableFromValue(ValueInterface $value)

No description

Details

static protected string getTypeFromClass(Style|object $class, string $suffix = 'Style')

Get the type handle of a given Style instance.

Parameters

Style|object $class
string $suffix

Return Value

string

$this setName(string $name)

Set the name of this style.

Parameters

string $name

Return Value

$this

getName()

Get the name of this style.

string getDisplayName(string $format = 'html')

Get the display name for this style (localized and escaped accordingly to $format).

Parameters

string $format

= 'html' Escape the result in html format (if $format is 'html'). If $format is 'text' or any other value, the display name won't be escaped.

Return Value

string

$this setVariable(string $variable)

Set the name of the associated CSS variable.

Parameters

string $variable

Return Value

$this

getVariable()

Get the name of the associated CSS variable.

getVariableToInspect()

Gets the name of the CSS variable we should use to inspect the data collection AND write into the request data collection. The reason for this is because the new customizer just has a unified approach to this –whereas the old customizer made you define the name of the variable in the xml file as page-background and reference it with page-background-color in the variable collections.

jsonSerialize()

No description

static Value[] getValuesFromVariables(mixed $rules)

No description

Parameters

mixed $rules

Return Value

Value[]

ValueInterface|null createValueFromVariableCollection(NormalizedVariableCollection $collection)

No description

Parameters

NormalizedVariableCollection $collection

Return Value

ValueInterface|null

ValueInterface|null createValueFromRequestDataCollection(array $styles)

No description

Parameters

array $styles

Return Value

ValueInterface|null

VariableInterface|null createVariableFromValue(ValueInterface $value)

No description

Parameters

ValueInterface $value

Return Value

VariableInterface|null