Chapter 8. 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 developing custom extensions. The first two recipes are informational and describe the basic usage of dependency injection and plugins. The other recipes are examples on how to add your custom XML configuration file and commands to the Magento CLI tool.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.156.251