In Magento 1
($optionType == Mage_Catalog_Model_Product_Option::OPTION_TYPE_AREA):
But, in Magento 2, I have to pass responsible class object type in constructor.
How I change this in Magento 2?
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this communityYou can call the constant variable directly:
($optionType == \Magento\Catalog\Model\Product\Option::OPTION_TYPE_AREA)