Determine how to locate different types of files in Magento 2

Magento 2’s core files are found in /vendor/magento or /app/code/Magento

/Api: Service Contracts

/Api/Data: Data Service Contacts

/Block: View Models (or template “assistants”)

/Console: Console Commands

/Controller: Web Request Handlers

/Controller/Adminhtml: Admin controllers

/Cron: Cron Job Classes

/etc: Configuration files

/Helper: Occasionally useful for small, reusable code

/i18n: Translation CSV Files

/Model: Data Handling and Structures

/Model/ResourceModel: Database Interactions

/Observer: Event Listeners

/Plugin: Function Modification

/Setup: Database Modification


/Ui: UI Component Data Providers

  • /view/[area]/layout: Layout XML Directives
  • /view/[area]/templates: Block Templates
  • /view/adminhtml/ui_component: UI Components
  • /view/[area]/web: Web Assets
  • /view/[area]/web/template: JS Templates
  • /view/[area]/requirejs-config.js

Leave a Reply

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