I am currently invoking the method âxyzâ using the objectmanager, however the object manager should not be used in phtml file as mentioned in the Magento 2 documentation. What is the best practice way to create an object of other classes?
I am currently invoking the method âxyzâ using the objectmanager, however the object manager should not be used in phtml file as mentioned in the Magento 2 documentation. What is the best practice way to create an object of other classes?