abstract class Style (View source)

Properties

protected string $name

The name of this style.

protected string $variable

The name of the associated CSS variable.

Methods

render(Value|null|false $value = false)

Render the control of this style.

Value|null
getValueFromRequest(ParameterBag $request)

Get the value of this style as received from a request.

Value|null
getValueFromList(ValueList $list)

Get the value of this style extracted from a list of values.

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

Get the type handle of a given Style instance.

$this
setName(string $name)

Set the name of this style.

string
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).

$this
setVariable(string $variable)

Set the name of the associated CSS variable.

string
getVariable()

Get the name of the associated CSS variable.

string
getFormElementPath()

Get a path to an elements directory for this Style. Might not be used by all styles.

static Value[]
getValuesFromVariables(mixed $rules)

No description

Details

abstract render(Value|null|false $value = false)

Render the control of this style.

Parameters

Value|null|false $value

the current style value

abstract Value|null getValueFromRequest(ParameterBag $request)

Get the value of this style as received from a request.

Parameters

ParameterBag $request

the received data

Return Value

Value|null

Value|null getValueFromList(ValueList $list)

Get the value of this style extracted from a list of values.

Parameters

ValueList $list

Return Value

Value|null

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

string getName()

Get the name of this style.

Return Value

string

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

string getVariable()

Get the name of the associated CSS variable.

Return Value

string

string getFormElementPath()

Get a path to an elements directory for this Style. Might not be used by all styles.

Return Value

string

static Value[] getValuesFromVariables(mixed $rules)

No description

Parameters

mixed $rules

Return Value

Value[]