Automattic\WooCommerce\Internal\Features\ProductBlockEditor\ProductTemplates
Subsection::__construct
Subsection Block constructor.
Method of the class: Subsection{}
No Hooks.
Returns
null
. Nothing (null).
Usage
$Subsection = new Subsection(); $Subsection->__construct( $config, $root_template, ?ContainerInterface $parent );
- $config(array) (required)
- The block configuration.
- $root_template(BlockTemplateInterface) (required)
- The block template that this block belongs to.
- ?ContainerInterface $parent(passed by reference — &)
- .
Default: null
Subsection::__construct() Subsection:: construct code WC 9.9.5
public function __construct( array $config, BlockTemplateInterface &$root_template, ?ContainerInterface &$parent = null ) { // phpcs:ignore Universal.NamingConventions.NoReservedKeywordParameterNames.parentFound 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 ); }