Showing results for 
Search instead for 
Did you mean: 

Adding functionality to Plugin AOP

0 Kudos

Adding functionality to Plugin AOP

Feature request from omdeshpande, posted on GitHub Jul 03, 2016

AOP implemented by the Plugins in Magento2 a good framework feature.

Currently, these AOP overrides work on the basis of one class at a time. What could be a great addition to this, is to have Spring (Java) like 'Pointcut patterns'. Pointcut patterns will make it possible to inject 'before', 'after' and 'around' to multiple functions and classes through a single statement. It will make plugin definitions more powerful and efficient. Would be great for something like logging. Sample -

If this makes sense to you guys, I'm open to contributing. Will be great to hear your thoughts!