How to pass custom parameters to parent construct?How to call a model method from controller in Magento2Creating custom module in magento2 show fatal errorI created a custom module ,but getting error, not able to figure out what the error is about. How to get out of this error?How to override core class which is already overrided by other custom module in Magento 2main.CRITICAL: Plugin class doesn't exist__construct() argument error when overriding 2 custom modules from same core moduleCompile: Extra parameters passed to parent construct: $contextMagento 2.3 Can't view module's front end page output?Unable to Serialize Value Magento 2.2.6Unable to serialize value problem with Magento 2.2.6

How do conventional missiles fly?

GFCI outlets - can they be repaired? Are they really needed at the end of a circuit?

What is the opposite of "eschatology"?

My ex-girlfriend uses my Apple ID to log in to her iPad. Do I have to give her my Apple ID password to reset it?

Is it possible to map the firing of neurons in the human brain so as to stimulate artificial memories in someone else?

how do we prove that a sum of two periods is still a period?

files created then deleted at every second in tmp directory

Description list Formatting using enumitem

What Exploit Are These User Agents Trying to Use?

Does the Idaho Potato Commission associate potato skins with healthy eating?

What historical events would have to change in order to make 19th century "steampunk" technology possible?

Why was the shrink from 8″ made only to 5.25″ and not smaller (4″ or less)

How dangerous is XSS

What is required to make GPS signals available indoors?

ssTTsSTtRrriinInnnnNNNIiinngg

Is there an online compendium of Rav Moshe teshuvos in English that exists?

Does int main() need a declaration on C++?

What is a Samsaran Word™?

How could indestructible materials be used in power generation?

Was the Stack Exchange "Happy April Fools" page fitting with the '90's code?

Does Dispel Magic work on Tiny Hut?

How can I deal with my CEO asking me to hire someone with a higher salary than me, a co-founder?

Unlock My Phone! February 2018

Should I tell management that I intend to leave due to bad software development practices?



How to pass custom parameters to parent construct?


How to call a model method from controller in Magento2Creating custom module in magento2 show fatal errorI created a custom module ,but getting error, not able to figure out what the error is about. How to get out of this error?How to override core class which is already overrided by other custom module in Magento 2main.CRITICAL: Plugin class doesn't exist__construct() argument error when overriding 2 custom modules from same core moduleCompile: Extra parameters passed to parent construct: $contextMagento 2.3 Can't view module's front end page output?Unable to Serialize Value Magento 2.2.6Unable to serialize value problem with Magento 2.2.6













0















I have extended MagentoSalesControllerAdminhtmlOrder to Custom class like below,but not able pass one more parameter ($httpClientFactory) to this construct level.



how to pass custom parameters ($httpClientFactory) to parent construct?




/**
* @param ActionContext $context
* @param MagentoFrameworkRegistry $coreRegistry
* @param MagentoFrameworkAppResponseHttpFileFactory $fileFactory
* @param MagentoFrameworkTranslateInlineInterface $translateInline
* @param MagentoFrameworkViewResultPageFactory $resultPageFactory
* @param MagentoFrameworkControllerResultJsonFactory $resultJsonFactory
* @param MagentoFrameworkViewResultLayoutFactory $resultLayoutFactory
* @param MagentoFrameworkControllerResultRawFactory $resultRawFactory
* @param OrderManagementInterface $orderManagement
* @param OrderRepositoryInterface $orderRepository
* @param LoggerInterface $logger
* @param MagentoFrameworkViewLayoutFactory $layoutFactory
*
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
*/
public function __construct(
ActionContext $context,
MagentoFrameworkRegistry $coreRegistry,
MagentoFrameworkAppResponseHttpFileFactory $fileFactory,
MagentoFrameworkTranslateInlineInterface $translateInline,
MagentoFrameworkViewResultPageFactory $resultPageFactory,
MagentoFrameworkControllerResultJsonFactory $resultJsonFactory,
MagentoFrameworkViewResultLayoutFactory $resultLayoutFactory,
MagentoFrameworkControllerResultRawFactory $resultRawFactory,
OrderManagementInterface $orderManagement,
OrderRepositoryInterface $orderRepository,
LoggerInterface $logger,
MagentoFrameworkViewLayoutFactory $layoutFactory,
**MagentoFrameworkHTTPZendClientFactory $httpClientFactory**
)
$this->layoutFactory = $layoutFactory;
**$this->_httpClientFactory = $httpClientFactory;**
parent::__construct(
$context,
$coreRegistry,
$fileFactory,
$translateInline,
$resultPageFactory,
$resultJsonFactory,
$resultLayoutFactory,
$resultRawFactory,
$orderManagement,
$orderRepository,
$logger
);



}










share|improve this question






















  • you have to define _httpClientFactory before your constructor

    – magefms
    19 mins ago











  • like protected $_httpClientFactory

    – magefms
    19 mins ago















0















I have extended MagentoSalesControllerAdminhtmlOrder to Custom class like below,but not able pass one more parameter ($httpClientFactory) to this construct level.



how to pass custom parameters ($httpClientFactory) to parent construct?




/**
* @param ActionContext $context
* @param MagentoFrameworkRegistry $coreRegistry
* @param MagentoFrameworkAppResponseHttpFileFactory $fileFactory
* @param MagentoFrameworkTranslateInlineInterface $translateInline
* @param MagentoFrameworkViewResultPageFactory $resultPageFactory
* @param MagentoFrameworkControllerResultJsonFactory $resultJsonFactory
* @param MagentoFrameworkViewResultLayoutFactory $resultLayoutFactory
* @param MagentoFrameworkControllerResultRawFactory $resultRawFactory
* @param OrderManagementInterface $orderManagement
* @param OrderRepositoryInterface $orderRepository
* @param LoggerInterface $logger
* @param MagentoFrameworkViewLayoutFactory $layoutFactory
*
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
*/
public function __construct(
ActionContext $context,
MagentoFrameworkRegistry $coreRegistry,
MagentoFrameworkAppResponseHttpFileFactory $fileFactory,
MagentoFrameworkTranslateInlineInterface $translateInline,
MagentoFrameworkViewResultPageFactory $resultPageFactory,
MagentoFrameworkControllerResultJsonFactory $resultJsonFactory,
MagentoFrameworkViewResultLayoutFactory $resultLayoutFactory,
MagentoFrameworkControllerResultRawFactory $resultRawFactory,
OrderManagementInterface $orderManagement,
OrderRepositoryInterface $orderRepository,
LoggerInterface $logger,
MagentoFrameworkViewLayoutFactory $layoutFactory,
**MagentoFrameworkHTTPZendClientFactory $httpClientFactory**
)
$this->layoutFactory = $layoutFactory;
**$this->_httpClientFactory = $httpClientFactory;**
parent::__construct(
$context,
$coreRegistry,
$fileFactory,
$translateInline,
$resultPageFactory,
$resultJsonFactory,
$resultLayoutFactory,
$resultRawFactory,
$orderManagement,
$orderRepository,
$logger
);



}










share|improve this question






















  • you have to define _httpClientFactory before your constructor

    – magefms
    19 mins ago











  • like protected $_httpClientFactory

    – magefms
    19 mins ago













0












0








0








I have extended MagentoSalesControllerAdminhtmlOrder to Custom class like below,but not able pass one more parameter ($httpClientFactory) to this construct level.



how to pass custom parameters ($httpClientFactory) to parent construct?




/**
* @param ActionContext $context
* @param MagentoFrameworkRegistry $coreRegistry
* @param MagentoFrameworkAppResponseHttpFileFactory $fileFactory
* @param MagentoFrameworkTranslateInlineInterface $translateInline
* @param MagentoFrameworkViewResultPageFactory $resultPageFactory
* @param MagentoFrameworkControllerResultJsonFactory $resultJsonFactory
* @param MagentoFrameworkViewResultLayoutFactory $resultLayoutFactory
* @param MagentoFrameworkControllerResultRawFactory $resultRawFactory
* @param OrderManagementInterface $orderManagement
* @param OrderRepositoryInterface $orderRepository
* @param LoggerInterface $logger
* @param MagentoFrameworkViewLayoutFactory $layoutFactory
*
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
*/
public function __construct(
ActionContext $context,
MagentoFrameworkRegistry $coreRegistry,
MagentoFrameworkAppResponseHttpFileFactory $fileFactory,
MagentoFrameworkTranslateInlineInterface $translateInline,
MagentoFrameworkViewResultPageFactory $resultPageFactory,
MagentoFrameworkControllerResultJsonFactory $resultJsonFactory,
MagentoFrameworkViewResultLayoutFactory $resultLayoutFactory,
MagentoFrameworkControllerResultRawFactory $resultRawFactory,
OrderManagementInterface $orderManagement,
OrderRepositoryInterface $orderRepository,
LoggerInterface $logger,
MagentoFrameworkViewLayoutFactory $layoutFactory,
**MagentoFrameworkHTTPZendClientFactory $httpClientFactory**
)
$this->layoutFactory = $layoutFactory;
**$this->_httpClientFactory = $httpClientFactory;**
parent::__construct(
$context,
$coreRegistry,
$fileFactory,
$translateInline,
$resultPageFactory,
$resultJsonFactory,
$resultLayoutFactory,
$resultRawFactory,
$orderManagement,
$orderRepository,
$logger
);



}










share|improve this question














I have extended MagentoSalesControllerAdminhtmlOrder to Custom class like below,but not able pass one more parameter ($httpClientFactory) to this construct level.



how to pass custom parameters ($httpClientFactory) to parent construct?




/**
* @param ActionContext $context
* @param MagentoFrameworkRegistry $coreRegistry
* @param MagentoFrameworkAppResponseHttpFileFactory $fileFactory
* @param MagentoFrameworkTranslateInlineInterface $translateInline
* @param MagentoFrameworkViewResultPageFactory $resultPageFactory
* @param MagentoFrameworkControllerResultJsonFactory $resultJsonFactory
* @param MagentoFrameworkViewResultLayoutFactory $resultLayoutFactory
* @param MagentoFrameworkControllerResultRawFactory $resultRawFactory
* @param OrderManagementInterface $orderManagement
* @param OrderRepositoryInterface $orderRepository
* @param LoggerInterface $logger
* @param MagentoFrameworkViewLayoutFactory $layoutFactory
*
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
*/
public function __construct(
ActionContext $context,
MagentoFrameworkRegistry $coreRegistry,
MagentoFrameworkAppResponseHttpFileFactory $fileFactory,
MagentoFrameworkTranslateInlineInterface $translateInline,
MagentoFrameworkViewResultPageFactory $resultPageFactory,
MagentoFrameworkControllerResultJsonFactory $resultJsonFactory,
MagentoFrameworkViewResultLayoutFactory $resultLayoutFactory,
MagentoFrameworkControllerResultRawFactory $resultRawFactory,
OrderManagementInterface $orderManagement,
OrderRepositoryInterface $orderRepository,
LoggerInterface $logger,
MagentoFrameworkViewLayoutFactory $layoutFactory,
**MagentoFrameworkHTTPZendClientFactory $httpClientFactory**
)
$this->layoutFactory = $layoutFactory;
**$this->_httpClientFactory = $httpClientFactory;**
parent::__construct(
$context,
$coreRegistry,
$fileFactory,
$translateInline,
$resultPageFactory,
$resultJsonFactory,
$resultLayoutFactory,
$resultRawFactory,
$orderManagement,
$orderRepository,
$logger
);



}







magento2 construct






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 29 mins ago









Vamsy KrishnaVamsy Krishna

111




111












  • you have to define _httpClientFactory before your constructor

    – magefms
    19 mins ago











  • like protected $_httpClientFactory

    – magefms
    19 mins ago

















  • you have to define _httpClientFactory before your constructor

    – magefms
    19 mins ago











  • like protected $_httpClientFactory

    – magefms
    19 mins ago
















you have to define _httpClientFactory before your constructor

– magefms
19 mins ago





you have to define _httpClientFactory before your constructor

– magefms
19 mins ago













like protected $_httpClientFactory

– magefms
19 mins ago





like protected $_httpClientFactory

– magefms
19 mins ago










0






active

oldest

votes












Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f268455%2fhow-to-pass-custom-parameters-to-parent-construct%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Magento Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f268455%2fhow-to-pass-custom-parameters-to-parent-construct%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Nidaros erkebispedøme

Birsay

Where did Arya get these scars? Unicorn Meta Zoo #1: Why another podcast? Announcing the arrival of Valued Associate #679: Cesar Manara Favourite questions and answers from the 1st quarter of 2019Why did Arya refuse to end it?Has the pronunciation of Arya Stark's name changed?Has Arya forgiven people?Why did Arya Stark lose her vision?Why can Arya still use the faces?Has the Narrow Sea become narrower?Does Arya Stark know how to make poisons outside of the House of Black and White?Why did Nymeria leave Arya?Why did Arya not kill the Lannister soldiers she encountered in the Riverlands?What is the current canonical age of Sansa, Bran and Arya Stark?