ClassesBigCommerceEditorEditor Dialog Template

Editor_Dialog_Template

A class that handles rendering the editor dialog template with product filtering options.

  • Full name: \BigCommerce\Editor\Editor_Dialog_Template

Methods

__construct

Editor_Dialog_Template constructor.

public __construct(string $template_dir): mixed

Parameters:

ParameterTypeDescription
$template_dirstringPath to the templates/public directory.

js_config

Modify the configuration for the editor dialog.

public js_config(array $config, \BigCommerce\Rest\Products_Controller $products_controller, \BigCommerce\Rest\Shortcode_Controller $shortcode_controller): array

Parameters:

ParameterTypeDescription
$configarrayConfiguration array.
$products_controller\BigCommerce\Rest\Products_ControllerThe products controller instance.
$shortcode_controller\BigCommerce\Rest\Shortcode_ControllerThe shortcode controller instance.

Return Value:

Modified configuration.


render_dialog_once

Renders the editor dialog template only once to avoid duplication.

public render_dialog_once(): string

Gutenberg will load it earlier if enabled. We want to ensure it doesn’t get duplicated in the footer.

Return Value:

Rendered dialog HTML.


render_dialog

Renders the full dialog content.

public render_dialog(): string

Return Value:

Rendered dialog HTML.



Automatically generated on 2025-01-21