class LegacyStylesheetPreviewHandler implements PreviewHandlerInterface (View source)

Used by the legacy customizer, this preview handler loops through all customizable style sheets in the theme's root and saves them into the cache, which is then used by the getStylesheet method in the page.

Traits

Properties

protected StyleValueListFactory $styleValueListFactory
protected NormalizedVariableCollectionFactory $variableCollectionFactory

Methods

__construct(StyleValueListFactory $styleValueListFactory, NormalizedVariableCollectionFactory $variableCollectionFactory)

No description

getCustomPreviewResponse(Customizer $customizer, Page $page, PresetInterface $preset, array $requestData)

Method used by the customizer when choosing one or more custom values from the customizer on the left panel, and allowing it to submit the preview on the righthand content side.

deliverResponse(Customizer $customizer, Page $page, NormalizedVariableCollection $collection)

No description

getPresetPreviewResponse(Customizer $customizer, Page $page, PresetInterface $preset)

Method used by the customizer when customizing a theme and clicking on a preset but not modifying any of the values.

Details

addPresetFontsFileStyleToStyleValueList(LegacyCustomizerType $type, PresetInterface $preset, StyleValueList $styleValueList)

No description

Parameters

LegacyCustomizerType $type
PresetInterface $preset
StyleValueList $styleValueList

__construct(StyleValueListFactory $styleValueListFactory, NormalizedVariableCollectionFactory $variableCollectionFactory)

No description

Parameters

StyleValueListFactory $styleValueListFactory
NormalizedVariableCollectionFactory $variableCollectionFactory

Response getCustomPreviewResponse(Customizer $customizer, Page $page, PresetInterface $preset, array $requestData)

Method used by the customizer when choosing one or more custom values from the customizer on the left panel, and allowing it to submit the preview on the righthand content side.

Parameters

Customizer $customizer
Page $page
PresetInterface $preset
array $requestData

Return Value

Response

protected Response deliverResponse(Customizer $customizer, Page $page, NormalizedVariableCollection $collection)

No description

Parameters

Customizer $customizer
Page $page
NormalizedVariableCollection $collection

Return Value

Response

Response getPresetPreviewResponse(Customizer $customizer, Page $page, PresetInterface $preset)

Method used by the customizer when customizing a theme and clicking on a preset but not modifying any of the values.

Parameters

Customizer $customizer
Page $page
PresetInterface $preset

Return Value

Response