Documentation

Mage_Cms_Model_Preview_ProviderInterface
in

A module declares its provider under `global/cms/preview/providers/<entity>`, with the model alias in `<model>`, the ACL resource of the editor in `<acl>`, and the form field that holds the record id in `<id_field>`.

Tags
phpstan-import-type

Draft from Mage_Cms_Model_Preview

Table of Contents

Methods

getStorefrontAction()  : string|null
The full action name of the storefront page that shows $draft, such as `blog_index_view`, or null when no storefront page shows it alone. The preview adds the layout handle and the body class of that action, so the theme styles the draft as on that page.
getTargetHtml()  : string
The HTML that the preview shows for the target $block, from the $html it rendered.
isTarget()  : bool
Tell if $block renders the content of $draft. The preview marks the output of that block, so the editor can keep the two panes on the same passage.
prepare()  : array{data: array, warnings: list}
Turn the posted edit form into the data of a draft. Sanitize it as the save path does, so the preview shows what a save stores. A field that the save would refuse is left out, with a message in `warnings`.
render()  : bool
Render the storefront page of $draft through $action. Return false when the page cannot be shown.

Methods

getStorefrontAction()

The full action name of the storefront page that shows $draft, such as `blog_index_view`, or null when no storefront page shows it alone. The preview adds the layout handle and the body class of that action, so the theme styles the draft as on that page.

public getStorefrontAction(Draft $draft) : string|null
Parameters
$draft : Draft
Return values
string|null

prepare()

Turn the posted edit form into the data of a draft. Sanitize it as the save path does, so the preview shows what a save stores. A field that the save would refuse is left out, with a message in `warnings`.

public prepare(array<string, mixed> $post) : array{data: array, warnings: list}
Parameters
$post : array<string, mixed>
Return values
array{data: array, warnings: list}
On this page

Search results