Chapter 6. Creating Magento 2 Extensions – Advanced

In this chapter, we will cover some of the more advanced features when building Magento 2 extensions in the following recipes:

  • Using dependency injection to pass classes to your own class
  • Modifying functions with the use of plugins – Interception
  • Creating your own XML module configuration file
  • Creating your own product type
  • Working with service layers/contracts
  • Creating a Magento CLI command option

Introduction

In the previous chapter, we explained the basics on how to create a Magento 2 extension/module, including how to store data in a database and create a frontend page and backend grid with a form to add/edit data. In this chapter, we will explain some more advanced functions that can be used while ...

Get Magento 2 - Build World-Class online stores now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.