QuestionQ28

Adobe Commerce Architecture and Customization Techniques

An Adobe Commerce Developer wants to add an action to an existing route without interfering with the functionality of the original route’s actions.

What must the developer do to ensure the new action works without side effects in the original module?

  • A In the route declaration, use the before or after parameters to load their module in before or after the original module.
  • B Inject the new action into the standard router constructor's $actionList parameter.
  • C Add the action into to the Controllers/front_name/ in My_Module, Magento will automatically detect and use it.
Explanation

Adobe Commerce route configuration supports before and after attributes on a route’s module entry to extend an existing route and control the order in which controller actions are resolved. The original module remains available for actions that the extending module does not provide.

Learn more

Community Discussion

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