Posted on

Magento 2 : parent construct

Using magento 2.4.3 EE
I have extended a class

namespace VendormoduleBlockProductViewTypeBundleOption;

use VendormoduleModelAttributeSourceOrder;

class Checkbox extends MagentoBundleBlockCatalogProductViewTypeBundleOptionCheckbox

public function __construct(
MagentoFrameworkViewElementTemplateContext $context,
MagentoFrameworkJsonEncoderInterface $jsonEncoder,
MagentoCatalogHelperData $catalogData,
MagentoFrameworkRegistry $registry,
MagentoFrameworkStdlibStringUtils $string,
MagentoFrameworkMathRandom $mathRandom,
MagentoCheckoutHelperCart $cartHelper,
MagentoTaxHelperData $taxData,
MagentoFrameworkPricingHelperData $pricingHelper,
BssProductStockAlertHelperData $helper,
array $data = []
) {
$this->helper = $helper;
parent::__construct(
$context,
$jsonEncoder,
$catalogData,
$registry,
$string,
$mathRandom,
$cartHelper,
$taxData,
$pricingHelper,
$data
);
}

this class extends MagentoBundleBlockCatalogProductViewTypeBundleOptionCheckbox
it has no constructor defined.

not sure if i need to add parent construct in this vendor/module file or not ?

Leave a Reply

Your email address will not be published. Required fields are marked *