Automattic\WooCommerce\Admin\BlockTemplates

BlockTemplateInterface{}WC 1.0

Interface for block-based template.

No Hooks.

Usage

$BlockTemplateInterface = new BlockTemplateInterface();
// use class methods

Methods

  1. public generate_block_id( string $id_base )
  2. public get_area()
  3. public get_description()
  4. public get_id()
  5. public get_title()
  6. public to_json()

BlockTemplateInterface{} code WC 9.1.2

interface BlockTemplateInterface extends ContainerInterface {
	/**
	 * Get the template ID.
	 */
	public function get_id(): string;

	/**
	 * Get the template title.
	 */
	public function get_title(): string;

	/**
	 * Get the template description.
	 */
	public function get_description(): string;

	/**
	 * Get the template area.
	 */
	public function get_area(): string;

	/**
	 * Generate a block ID based on a base.
	 *
	 * @param string $id_base The base to use when generating an ID.
	 * @return string
	 */
	public function generate_block_id( string $id_base ): string;

	/**
	 * Get the template as JSON like array.
	 *
	 * @return array The JSON.
	 */
	public function to_json(): array;
}