Automattic\WooCommerce\Admin\BlockTemplates

ContainerInterface{}WC 1.0

Interface for block containers.

No Hooks.

Usage

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

Methods

  1. ERROR: no method name found on line `* @param string $block_id The block ID.`
  2. public get_block( string $block_id )
  3. public get_formatted_template()
  4. public get_root_template()
  5. ERROR: no method name found on line `/**`
  6. public remove_block( string $block_id )
  7. public remove_blocks()

ContainerInterface{} code WC 8.9.0

interface ContainerInterface {
	/**
	 * Get the root template that the block belongs to.
	 */
	public function &get_root_template(): BlockTemplateInterface;

	/**
	 * Get the block configuration as a formatted template.
	 */
	public function get_formatted_template(): array;

	/**
	 * Get a block by ID.
	 *
	 * @param string $block_id The block ID.
	 */
	public function get_block( string $block_id ): ?BlockInterface;

	/**
	 * Removes a block from the container.
	 *
	 * @param string $block_id The block ID.
	 *
	 * @throws \UnexpectedValueException If the block container is not an ancestor of the block.
	 */
	public function remove_block( string $block_id );

	/**
	 * Removes all blocks from the container.
	 */
	public function remove_blocks();
}