Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [di.xml]

The tag has no usage guidance.

2
votes
0answers
41 views

di.xml ExtensionPool create/read handlers Conflicts

I am creating extensionpool handlers to save data in multiple tables. There are total 3 tables : 1 : Sliders 2 : SliderItems 3 : SliderSelectedItems When I create/update Slider, list of selected ...
0
votes
0answers
17 views

Grid name=“collection” on di.xml work with an undefined path

When I want to generate the Grid on my admin panel, I need to add that on my di.xml. the code : <type name="Magento\Framework\View\Element\UiComponent\DataProvider\CollectionFactory"> ...
2
votes
2answers
87 views

How to create custom route in magento2

I have used below code in di.xml <type name="Magento\Framework\App\RouterList"> <arguments> <argument name="routerList" xsi:type="array"> <item name="...
0
votes
1answer
73 views

What is the Use of Type and Virtual Types(di.xml) in Magento2?

I want to know clear about Type and Virtual Types in di.xml with examples. When we can use it. Please share simple example to understand concept. Note please go through the practical examples.
1
vote
0answers
61 views

ifconfig to disable part of an extension

I have added a Column to the New Order -> Customer Grid. I am having a really tough time getting the system config to disable this code if turned off. I was hoping I could use a simple ifconfig in the ...
0
votes
1answer
44 views

Rewriting blocks in admin

di.xml: <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> <...
1
vote
2answers
444 views

Magento 2 How to over write route FrontName of a module?

I'm trying to extend Magento 2 default module Magente_Contact, but I can't change the frontName, I tried to put in the di.xml, but nothing happens. <config> <router id="standart"> ...
0
votes
1answer
30 views

In Magento 2 is there any chance to broke site due to spaces in di.xml file

Is there any chance or any cause to broke the site due to spaces in di.xml file in Magento 2
1
vote
1answer
466 views

admin grid not working

listing file <argument name="data" xsi:type="array"> <item name="js_config" xsi:type="array"> <item name="provider" xsi:type="string">faq_listing.faq_listing_data_source&...
3
votes
1answer
372 views

How to set ifconfig for di.xml magento 2

I want set ifconfig configuration for below code: First code in di.xml <virtualType name="searchFilterList" type="Magento\Catalog\Model\Layer\FilterList"> <arguments> <...
3
votes
2answers
1k views

Magento2: Change in di.xml

After making a change to app/etc/di.xml Am I required to take some additional steps in order for the change to take effect? Like clean cache, deploy static files or compile code?
7
votes
2answers
7k views

Magento 2 After plugin with parameter

I am trying to implement after plugin to the following method. public function getCategoryUrl($category) { if ($category instanceof ModelCategory) { return $category->getUrl(); } ...
0
votes
3answers
316 views

Overwrite pdf.xml

I want to overwrite pdf.xml in Magento 2.1.3 to change order for the total block, but i can't figure out how i can do that. The totals are ordered in pdf.xml in Magento/sales/pdf Edit: First I had ...
0
votes
1answer
223 views

Why is my Magento Catalog Block Preference ignored in di.xml?

I am trying to extend the Magento\Catalog\Block\Product\ListProduct block in Magento 2.1 My Vendor_ModuleName module has the registration.php, the etc/module.xml and it's enabled. Then I add an etc/...
5
votes
1answer
4k views

Is it possible to disable plugins defined in di.xml programatically?

Given a plugin defined in di.xml such as the following: <type name="\Magento\Catalog\Model\Product"> <plugin name="se_catalog_product_plugin_ample" type="Example\Module\Model\...
0
votes
1answer
699 views

Magento 2 : Display multiple grids in admin area

I have displayed my one custom table in a grid format. Now, I want to display one other custom table in a grid format (Under different menu). But I am little bit confused, how to add code in di.xml ...
8
votes
3answers
1k views

Correct, Supported way to Add CLI Commands to Magento 2

Is there a correct, and officially supported way, to add your CLI commands to a Magento 2 module? From what I've gathered your options are Add your command class to the commands argument of Magento\...
1
vote
1answer
312 views

What does this di.xml file have incorrect?

I am implementing a custom payment gateway. To be able to config it, I have created a ConfigProvider this way: <?php /** * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for ...
0
votes
2answers
129 views

Magento 2 For what secureUrlList at di

What purpose of using secureUrlList at Magento di.xml? It appear at few di.xml base and for frontend: Like an example: <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
5
votes
1answer
600 views

Swapping Less for Sass / Removing an argument previously added to type via di.xml in Magento2

So I am investigating Ben Mark's claim that is really easy to switch out the PHP Less pre-processor for a Sass one. https://twitter.com/benmarks/status/590219053437833217 (I don't buy it) I have ...
1
vote
1answer
3k views

Magento 2 class not exist error occurs when overriding a controller

error: a:4:{i:0;s:68:"Class namespace\modulename\Controller\CustomLoginPost does not exist";i:1;s:6711:"#0 C:\xampp2\htdocs\magento2\lib\internal\Magento\Framework\Code\Reader\ClassReader.php(19): ...
0
votes
1answer
234 views

Magento2 use Plugins (di.xml)

I have created a Plugin. Registered it in di.xml All public methods execute. Can I inject/rewrite/replace (don't know the proper title) protected methods? How?
8
votes
6answers
5k views

Delete operation is forbidden for current area

I want to create command for delete operation for simple product by sku. I'm getting following error.how to set admin area? [Magento\Framework\Exception\LocalizedException] Delete operation is ...