Jump to content

Extending AdminImportController : call private method


Recommended Posts

Hi all!

 

I try to extend the AdminImportController to add some custom fields but I got the following error:

 

PHP Fatal error:  Call to private method AdminImportControllerCore::setEntityDefaultValues() from context 'AdminImportController' in /[...]/override/controllers/admin/AdminImportController.php on line 43

 

Here the 43th line of my override:

AdminImportController::setEntityDefaultValues($product);

 

So, the script blocks because it cannot access to the function setEntityDefaultValues which is defined as private in AdminImportController.php

 

My question: do I duplicate every private function in my override even if I don't edit it?

 

Thanks for your help!

Link to comment
Share on other sites

  • 10 months later...
×
×
  • Create New...