Helpers in Magento2,

What is the equivalent class for the Magento 1 Mage_Core_Helper_Abstract

class Vendor_Module_Helper_Data extends Mage_Core_Helper_Abstract{

The equivalent is Magento\Framework\App\Helper\AbstractHelper

Thus you can create your class like this:

use Magento\Framework\App\Helper\AbstractHelper;

class Data extends AbstractHelper
Magento1 : Mage_Core_Helper_Abstract

Magento2 : \Magento\Framework\App\Helper\AbstractHelper

For example you can use like this in magento-2.

class Data extends \Magento\Framework\App\Helper\AbstractHelper


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.