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?