QuestionQ13

Architecture

Which file is used to add a custom router class to the router list?

  • A routes.xml
  • B di.xml
  • C config.xml
Explanation

A custom router is added to Magento\Framework\App\RouterList through dependency-injection configuration in the module’s etc/frontend/di.xml file. routes.xml maps a front name to a module for standard routing; it does not register a custom router class.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!