Log in
Model

DeleteWidgetById

Magento\Widget\Model\DeleteWidgetById

What it does

This class provides a service for deleting widget instances from the Magento system by their ID.

Developers would use this class when they need to programmatically remove a widget instance, such as during module uninstallation, data cleanup operations, or when implementing custom widget management features.

It handles validation to ensure the widget exists before deletion and throws an exception if the widget is not found.

Public Methods

  • execute()