Automattic\WooCommerce\Internal\Features\ProductBlockEditor\ProductTemplates

Subsection::__construct()publicWC 1.0

Subsection Block constructor.

Method of the class: Subsection{}

No Hooks.

Return

null. Nothing (null).

Usage

$Subsection = new Subsection();
$Subsection->__construct( $config, $root_template, $parent );
$config(array) (required)
The block configuration.
$root_template(BlockTemplateInterface) (required)
The block template that this block belongs to.
$parent(ContainerInterface|null)
The parent block container.
Default: null

Subsection::__construct() code WC 9.3.3

public function __construct( array $config, BlockTemplateInterface &$root_template, ContainerInterface &$parent = null ) {
	if ( ! empty( $config['blockName'] ) ) {
		throw new \InvalidArgumentException( 'Unexpected key "blockName", this defaults to "woocommerce/product-subsection".' );
	}
	parent::__construct( array_merge( array( 'blockName' => 'woocommerce/product-subsection' ), $config ), $root_template, $parent );
}