class LegacyStylesheetPreviewHandler implements PreviewHandlerInterface (View source)

deprecated

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.

getCustomStylePreviewResponse(Customizer $customizer, Page $page, CustomStyle $customStyle)

Used when a page level or custom theme customizer set has been saved and now needs to be re-previewed.

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

Response getCustomStylePreviewResponse(Customizer $customizer, Page $page, CustomStyle $customStyle)

Used when a page level or custom theme customizer set has been saved and now needs to be re-previewed.

Parameters

Customizer $customizer
Page $page
CustomStyle $customStyle

Return Value

Response