Skip to main content

Questions tagged [construct]

0 votes
1 answer
120 views

I want to override the file "Fooman\EmailAttachments\Observer\AbstractSendInvoiceObserver". Here is the code in the di.xml. <!-- module introduced preferences --> <preference for=&...
Jancy Abraham's user avatar
2 votes
3 answers
110 views

I am getting the following error on di compile: **Extra parameters passed to parent construct $directoryHelper** That's the original code: class PreviewButton extends \Magento\Config\Block\System\...
Someguy's user avatar
  • 21
0 votes
1 answer
32 views

Here is my save.php <?php namespace Mageplaza\Menu\Controller\Adminhtml\Post; use Mageplaza\Menu\Model\PostFactory; use Magento\Backend\App\Action; use Magento\Framework\App\Action\Context; use ...
Thoubik's user avatar
  • 178
1 vote
1 answer
1k views

I tried to make a simple ajax call to my controller, but I can't generate the url to make the request requirejs(['jquery', 'Magento_Ui/js/modal/confirm', 'mage/url'], function ($, confirmation, ...
GStiven's user avatar
  • 41
0 votes
1 answer
706 views

I have experience in programming with php and i think i have a good understanding of what a constructor does. But in Magento the constructor is called with the implemented Dependency's but after that ...
BigJonna's user avatar
0 votes
1 answer
96 views

I am overriding Google analytics block file. Here is my Vendor/Module/etc/di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
Manjunath's user avatar
  • 187
1 vote
0 answers
47 views

Is it possible to retrieve dependency injected arguments in another class? For example, we have a class Vendor\Module\Block\Autocomplete. // app/code/Vendor/Module/Block/Autocomplete.php namespace ...
Quisse's user avatar
  • 878
0 votes
0 answers
234 views

I have a console command class with constrcutor that looks like this: namespace Vendor\Module\Console\Command; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\...
jojo's user avatar
  • 79

15 30 50 per page