Magento 2 - What does the AbstractHelper do, and is it required?
Your custom class don't need to extends the Abstract helper core class.
However, the Abstract helper provides helpful methods:
- Module statuses manager -
Magento\Framework\Module\Manager
- Logger -
Magento\Framework\Logger\Monolog
- Http request info -
Magento\Framework\App\Request\Http
- Url -
Magento\Framework\Url
. - Library for working with HTTP headers -
Magento\Framework\HTTP\Header
- Event manager -
\Magento\Framework\Event\Manager
. - Library for working with client ip address -
\Magento\Framework\HTTP\PhpEnvironment\RemoteAddress
. - Cache configuration model. Provides cache configuration data to the application -
Magento\Framework\Cache\Config
. - Base64 encoder and decoder for URLs -
Magento\Framework\Url\Encoder
andMagento\Framework\Url\Decoder
. - Application configuration object. Used to access configuration when application is initialized and installed -
Magento\Framework\App\Config
If you want to use some helpful methods, your custom class should extends from the Abstract helper.