magefan / module-plugin-sortorder-example
Magefan_PluginSortOrderExample
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 2
Forks: 0
Open Issues: 0
Type:magento2-module
README
Installation
composer require magefan/module-plugin-sortorder-example
bin/magento setup:upgrade --keep-generated
bin/magento setup:di:compile
How to test?
Visit url:
http://[mydomain.com]/pluginsortorderexample/pluginsortorder/example
You sould see
-PluginA::beforeDispatch
---PluginA::aroundDispatch // before executing callable
-----PluginB::beforeDispatch
-------PluginB::aroundDispatch // before executing callable
---------PluginC::beforeDispatch
-----------PluginC::aroundDispatch // before executing callable
-------------Action::dispatch()
-----------PluginC::aroundDispatch // after executing callable
---------PluginC::afterDispatch
-------PluginB::aroundDispatch // after executing callable
-----PluginB::afterDispatch
---PluginA::aroundDispatch // after executing callable
-PluginA::afterDispatch
Read more about Magento Magento 2 Plugin Sort Order.