Use a before plugin to modify function parameters in Magento
Learn how to use a Magento 2 before plugin to modify observer execute parameters and add custom request data.
Lesson Content
Let’s take a look at this LogPostDetailView observer class from the Macademy_Blog module, and let’s say we wanted to manually add a parameter to the request object with some backend code. Since th...
Premium content
Enroll to unlock the full content and all course materials.
Join the discussion!
Comments
Want to comment on this lesson?
Enroll in this course to leave comments.