You are implementing a before plugin in MyCompany_Magic. It will intercept the same method that MyCompany_Admission is already intercepting using a before plugin: Topmenu::getBlockHtml Which two actions are required to ensure the new plugin will execute last? (Choose two.)
A. Include a sortOrder="20" on the new plugin in MyCompany_Magic’s etc/di.xml file
B. Configure plugin sequencing for both plugins in MyCompany_Magic’s etc/plugin_sequence.xml file
C. Set a sortOrder="10" for MyCompany_Admission’s plugin in MyCompany_Magic’s etc/di.xml
D. Add MyCompany_Admission as a dependency in MyCompany_Magic’s etc/module.xml file
A & D
My Opinion is A and D because when i tested plugin without sort order load always before the plugin which have sort order where you define sequence dependency in module.xml or not.
so when i try combination A and C worked and A and D also worked but combination C and D failed to do that.
so we can see according to simplicity A and D is correct and no necessory to define already defined plugin sort order except those plugin are from Magento\Framwork or any library module.
Completely Agree with you, I also practically checked and got similar results. A&D or A&C both could be the Answer but A and D would be the more appropriate answer than A&C as module MyCompany_Admission was already installed so we can set dependency into MyCompany_Magic module.xml file.
Answer: A and D
if the option d is not available then answer should be A and C
Correct Answers are : A, D
Magento documentations says:
“If two or more plugins have the same sortOrder value or do not specify it, the component load order declared in the sequence node from module.xml and area will define the merge sequence. Check the component load order in app/etc/config.php file.”
In our case we can set 2 different sortOrder values so correct values are A ans C
I believe the answer is A & D,
E – plugin_sequence.xml is not a thing.
C – Since the vendor of this module are both MyCompany, we can safely assume that the same developer created both modules therefore there should be little point in specifying sortOrder=”10″ within MyCompany_Magic’s etc/di.xml. Besides, if you’re going to do this, you should really depend on MyCompany_Admission in MyCompany_Magic’s etc/module.xml file anyway.
A and D is correct ans
For A and C scenario :
A. Include a sortOrder=”20″ on the new plugin in MyCompany_Magic’s etc/di.xml file
>> MyCompany_Magic’s etc/di.xml file
C. Set a sortOrder=”10″ for MyCompany_Admission’s plugin in MyCompany_Magic’s etc/di.xml
>> MyCompany_Magic’s etc/di.xml file
why both plugin’s sort orders need to define in one module ?
it should be in module’s di.xml file
Correct answer is A,C. B no such file plugin_sequence.xml. D has nothing to do with order of plugin execution
This is saying it’s all about sort order so must be A and C.
https://magento.stackexchange.com/questions/317375/preparing-for-magento-2-associate-developer-certification
Ive never edited another plugins sort order before which makes C seem strange but you must be able to do it. If so, thats better than D because D has no bearing on execution order.
bc are wrong
so it must be ad
i think a,c
im not undertand why anser D??
I think is A and D.
Wrong answer