ConvertSettingsToDefaultValueThemeExtensions
in package
Class ConvertSettingsToDefaultValueThemeExtensions
Table of Contents
- GROUP_PROPERTIES = ['background-gradient' => ['enabled' => '-enabled', 'color1' => '-color1', 'color2' => '-color2', 'gradientType' => '-type', 'angle' => '-angle'], 'background-image' => ['enabled' => '-enabled', 'url' => '-url', 'position' => '-position', 'repeat' => '-repeat', 'size' => '-size', 'attachment' => '-attachment'], 'border' => ['top' => '-top', 'right' => '-right', 'bottom' => '-bottom', 'left' => '-left', 'style' => '-style', 'color' => '-color'], 'font' => ['family' => '-family', 'color' => '-color', 'size' => '-size', 'style' => '-style', 'textAlign' => '-text-align', 'textDecorationUnderline' => '-text-decoration-underline', 'textTransformUppercase' => '-text-transform-uppercase', 'enableCustomization' => '-enable-customization'], 'margin' => ['top' => '-top', 'right' => '-right', 'bottom' => '-bottom', 'left' => '-left'], 'padding' => ['top' => '-top', 'right' => '-right', 'bottom' => '-bottom', 'left' => '-left']]
- OPTION_GROUPS = ['background', 'background-gradient', 'background-image', 'border', 'font', 'margin', 'padding']
- $overwrites : array<string|int, mixed>
- $settings : array<string|int, mixed>|array<string|int, stdClass>
- $themeJson : stdClass
- __construct() : mixed
- ConvertSettingsToDefaultValueThemeExtensions constructor.
- convert() : array<string|int, stdClass>
- getOptionValue() : mixed
- getOptionValuesGroup() : stdClass|null
- loopThroughCategories() : void
- mapSettingsArray() : void
- setOptionValues() : void
Constants
GROUP_PROPERTIES
protected
mixed
GROUP_PROPERTIES
= ['background-gradient' => ['enabled' => '-enabled', 'color1' => '-color1', 'color2' => '-color2', 'gradientType' => '-type', 'angle' => '-angle'], 'background-image' => ['enabled' => '-enabled', 'url' => '-url', 'position' => '-position', 'repeat' => '-repeat', 'size' => '-size', 'attachment' => '-attachment'], 'border' => ['top' => '-top', 'right' => '-right', 'bottom' => '-bottom', 'left' => '-left', 'style' => '-style', 'color' => '-color'], 'font' => ['family' => '-family', 'color' => '-color', 'size' => '-size', 'style' => '-style', 'textAlign' => '-text-align', 'textDecorationUnderline' => '-text-decoration-underline', 'textTransformUppercase' => '-text-transform-uppercase', 'enableCustomization' => '-enable-customization'], 'margin' => ['top' => '-top', 'right' => '-right', 'bottom' => '-bottom', 'left' => '-left'], 'padding' => ['top' => '-top', 'right' => '-right', 'bottom' => '-bottom', 'left' => '-left']]
OPTION_GROUPS
protected
array<string|int, string>
OPTION_GROUPS
= ['background', 'background-gradient', 'background-image', 'border', 'font', 'margin', 'padding']
Properties
$overwrites
protected
array<string|int, mixed>
$overwrites
= []
$settings
protected
array<string|int, mixed>|array<string|int, stdClass>
$settings
$themeJson
protected
stdClass
$themeJson
Methods
__construct()
ConvertSettingsToDefaultValueThemeExtensions constructor.
public
__construct(stdClass $themeJson, array<string|int, stdClass> $settings) : mixed
Parameters
- $themeJson : stdClass
- $settings : array<string|int, stdClass>
Tags
Return values
mixed —convert()
public
convert() : array<string|int, stdClass>
Return values
array<string|int, stdClass> —getOptionValue()
protected
getOptionValue(string $id) : mixed
Parameters
- $id : string
Return values
mixed —getOptionValuesGroup()
protected
getOptionValuesGroup(string $id, string $type) : stdClass|null
Parameters
- $id : string
- $type : string
Return values
stdClass|null —loopThroughCategories()
protected
loopThroughCategories(stdClass $category) : void
Parameters
- $category : stdClass
Return values
void —mapSettingsArray()
protected
mapSettingsArray(array<string|int, mixed> $settings) : void
Parameters
- $settings : array<string|int, mixed>
Tags
Return values
void —setOptionValues()
protected
setOptionValues(stdClass $option) : void
Parameters
- $option : stdClass