Want more?

Get 5 more Magento 2 Tips & Tricks emailed to you over the next couple weeks:

Magento 2 Tips & Tricks

Let's get started with one right now: Argument Substitution

Have you ever wondered how to override a function parameter value with XML?

Thanks to the power of dependency injection, we can easily do this by defining an arguments node for a type in a di.xml file:

The most common usage of this is with arrays, however values can also be passed in for any other PHP data type, such as integers or strings.

While this may not always be preferred depending upon your implementation method and use-case, knowing how to modify values dynamically with XML can be a great weapon to have in your Magento 2 development arsenal.

Magento 2 Tips

Get 5 more Magento 2 Tips & Tricks emailed to you over the next couple weeks:

Meet the instructor

Mark Shust

Mark Shust

mark@m.academy

Hi there!
I'm Mark, the founder of M.academy.

My passion over the last decade has revolved entirely around Magento. Starting with the early days of Magento 0.8, I've had a heavy interest in the Zend and Magento Frameworks, and have been devoted to eCommerce & PHP for even longer (over 20 years!). I've held all positions within many organizations, ranging from junior developer to chief solution architect.

During this time I've spoken at conferences such as Magento Imagine and Meet Magento New York, and have been very outspoken in regards to following accepted best practices for Magento.

My numerous years of LAMP stack programming expertise have paved the way for me to become a Zend Certified Engineer and 3x Magento Certified Developer. I love open-source software, and have maintained the most popular development environment for Magento since the release of Magento 2.

I'm married to my wonderful wife Juliann, and we are the proud parents of twin girls Lily and Brielle. I live in Northeast Ohio and love eating chipotle burritos, solving Rubik's cubes, driving my 240sx, and watching Cleveland Browns games.