ExamGecko
Question list
Search
Search

Question 5 - AD0-E717 discussion

Report
Export

How can a developer prioritize a plugin's execution, if possible?

A.
The developer can use sortOrder property by specifying a lower value than the target plugin.
Answers
A.
The developer can use sortOrder property by specifying a lower value than the target plugin.
B.
The developer can use sortOrder property by specifying a higher value than the target plugin.
Answers
B.
The developer can use sortOrder property by specifying a higher value than the target plugin.
C.
This cannot be achieved as the plugins are always executed by their module's load order in app/etc/config.php file.
Answers
C.
This cannot be achieved as the plugins are always executed by their module's load order in app/etc/config.php file.
Suggested answer: B

Explanation:

To prioritize a plugin's execution, a developer can use the sortOrder property and specify a higher value than the target plugin. For example, if the developer wants to prioritize a plugin named MyPlugin over a plugin named OtherPlugin, they would add the following code to the etc/config.php file:

'modules' => [

'Vendor_MyPlugin' => [

'sortOrder' => 100,

],

'Vendor_OtherPlugin' => [

'sortOrder' => 50,

],

],

This would ensure that MyPlugin is always executed before OtherPlugin.

asked 02/10/2024
Jose Manuel Belmonte Martinez
34 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first