Utilize Configuration XML in Magento 2



This is the only required configuration file. It specifies the current module’s version and the module loading order.

Example: vendor/magento/module-catalog/etc/module.xml

This defines the permissions for accessing protected resources.

Example: vendor/magento/module-catalog/etc/acl.xml

This loads in default configuration in to Store > Configuration. This is also where configuration entries can be marked as encrypted (password).

Example: vendor/magento/module-fedex/etc/config.xml

This identifies actions that are to occur on a schedule.

Example: vendor/magento/module-catalog/etc/crontab.xml

This configures dependency injection for your module. This is perhaps the most frequently used file when customizing Magento. Here plugins are defined, class substitutions performed, concrete classes are specified for interfaces, virtual types setup, and constructor arguments can be specified or modified. It is very important to familiarize yourself with the capabilities of this file.

Example: vendor/magento/module-catalog/etc/di.xml

Specifies email templates that are used in Magento. The template id is the concatenated XML-style path to where in system configuration template is specified.

Example: vendor/magento/module-customer/etc/email_templates.xml

This file registers event listeners. This file can often be put into a specific area.

Example: vendor/magento/module-catalog/etc/frontend/events.xml

Configures Magento indexers.

Example: vendor/magento/module-catalog/etc/indexer.xml

Configures the menu in the adminhtml area.

Example: vendor/magento/module-customer/etc/adminhtml/menu.xml

Triggers a type of event when data is modified in a database column (materialized views). This is most often used for indexing.

Example: vendor/magento/module-catalog/etc/mview.xml

Tells Magento that this area accepts web requests. The route node configures the first part of the layout handle (route ID) and the front name (first segment in the URL after the domain name).

Example : vendor/magento/module-customer/etc/frontend/routes.xml

Specifies configuration tabs, sections, groups and fields found in Store Configuration.

Example: vendor/magento/module-customer/etc/adminhtml/system.xml

Similar to config.xml but used for specifying default values for design configuration.

Example: vendor/magento/theme-frontend-luma/etc/view.xml

Configures API access and routes.

Example: vendor/magento/module-catalog/etc/webapi.xml

Configures widgets to be used in products, CMS pages, and CMS blocks.

Example: vendor/magento/module-catalog/etc/widget.xml

Source : SwiftOtter

Leave a Reply

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