Automattic\WooCommerce\Internal\Features\ProductBlockEditor\ProductTemplates
Group::__construct()
Group Block constructor.
Метод класса: Group{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$Group = new Group(); $Group->__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
Код Group::__construct() Group:: 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-tab".' ); } if ( $config['id'] && ( empty( $config['attributes'] ) || empty( $config['attributes']['id'] ) ) ) { $config['attributes'] = empty( $config['attributes'] ) ? array() : $config['attributes']; $config['attributes']['id'] = $config['id']; } parent::__construct( array_merge( array( 'blockName' => 'woocommerce/product-tab' ), $config ), $root_template, $parent ); }