Automattic\WooCommerce\Internal\Features\ProductBlockEditor\ProductTemplates
Subsection::__construct()
Subsection Block constructor.
Метод класса: Subsection{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$Subsection = new Subsection(); $Subsection->__construct( $config, $root_template, $parent );
- $config(массив) (обязательный)
- The block configuration.
- $root_template(BlockTemplateInterface) (обязательный)
- The block template that this block belongs to.
- $parent(ContainerInterface|null)
- The parent block container.
По умолчанию: null
Код Subsection::__construct() Subsection:: construct WC 9.7.1
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 ); }