ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 4 - AD0-E716 discussion

Report
Export

The di. xml file of a module attaches two plugins for the class Action.

The around plugin code is:

What would be the plugin execution order?

A)

B)

C)

A.
Option A
Answers
A.
Option A
B.
Option B
Answers
B.
Option B
C.
Option C
Answers
C.
Option C
Suggested answer: C

Explanation:

The plugin execution order is as follows:

PluginA::beforeDispatch()

PluginB::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:

PluginA

beforeDispatch()

aroundDispatch()

afterDispatch()

PluginB

beforeDispatch()

afterDispatch()

asked 02/10/2024
Jose Alberto Vecino Pacheco
31 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first