How to Get Module’s view directory image or js full path using Magento 2?

You can retrieve the full path of the Module’s static asset like Images, Javascript, or CSS file path using Magento 2.

If you want to get the full path of the view directory for the frontend or backend area, You need to use Magento\Framework\View\Asset\Repository class to achieve the task. Continue reading “How to Get Module’s view directory image or js full path using Magento 2?”

Magento 2 Create custom event and observer using events.xml programmatically.

Magento 2 Supports Create Custom Event Observer with your event name.

Under your module with the event defines using dispatch() method and events.xml file. You can Handle the Events data using Observer Class. Continue reading “Magento 2 Create custom event and observer using events.xml programmatically.”

Uninstall module with database table schema using Magento 2.

Uninstall module using Magento 2, Native command is module:uninstall to remove module from the system.

Uninstall command works only with a module installed using a composer or defined as Composer packages. Continue reading “Uninstall module with database table schema using Magento 2.”