nerdexam
Adobe

AD0-E716 · Question #4

The di. xml file of a module attaches two plugins for the class Action. The PluginA has the methods: beforeDispatch, aroundDispatch, afterDispatch. The PluginB has the methods: beforeDispatch…

The correct answer is C. Option C. The plugin execution order is as follows: PluginA::beforeDispatch() PluginA::aroundDispatch() The code in the around plugin PluginB::afterDispatch() PluginA::afterDispatch() The aroundDispatch() method is executed in a separate scope, so the code in the around plugin will be…

Customization

Question

The di. xml file of a module attaches two plugins for the class Action. The PluginA has the methods: beforeDispatch, aroundDispatch, afterDispatch. The PluginB has the methods: beforeDispatch, afterDispatch. The around plugin code is:

What would be the plugin execution order? A) B) C)

Exhibit

AD0-E716 question #4 exhibit

Options

  • AOption A
  • BOption B
  • COption C

How the community answered

(23 responses)
  • A
    22% (5)
  • B
    9% (2)
  • C
    70% (16)

Explanation

The plugin execution order is as follows: PluginA::beforeDispatch() PluginA::aroundDispatch() The code in the around plugin PluginB::afterDispatch() PluginA::afterDispatch() The aroundDispatch() method is executed in a separate scope, so the code in the around plugin will be executed after the beforeDispatch() methods of both plugins, but before the afterDispatch() methods of both plugins. Here is a diagram that shows the plugin execution order: beforeDispatch() aroundDispatch() beforeDispatch()

Topics

#plugin execution order#around plugin#interceptors#di.xml

Community Discussion

No community discussion yet for this question.

Full AD0-E716 Practice