cancel
Showing results for 
Search instead for 
Did you mean: 

How to Add a new method to an Abstract Class in Magento 2

How to Add a new method to an Abstract Class in Magento 2

In Magento 1, I can just create a full new class. In Magento 2, we should use plugins instead, but plugins only allow me to modified existent methods. What if I need to add a new method? Example: this class vendor/magento/module-ui/Component/AbstractComponent.php, has an array of components: $components, there is no function to unset/delete elements for that array. So how can I create that function?