This presentation was given at a PHP Antwerp Meetup: https://www.meetup.com/phpantwerp/events/237632633/
Magento 2 is a commerce platform released since November 2015. In this introduction I’ll focus on the open source version, Magento Community and show you how easy it is to start creating modules for this platform. These modules can be used to customize your store or to publish on the Magento Marketplace.
31. Plugins
• Modifies behavior of a public method of a class
• Before method
• Runs before the method
• Receives the arguments of the method
• After method
• Runs after completion of the method
• Receives the output of the method
• Around method
• Runs both before and after the method
• Receives the arguments of the method
• Receives a callable, which will give the output of the method