Model
DeleteValidator
Magento\Catalog\Model\Product\Gallery\DeleteValidator
What it does
This class validates whether a product gallery image can be safely deleted by checking if it's assigned to image roles (base, small, thumbnail, swatch) in other store views.
Developers use this validator before removing product images to prevent breaking image assignments in multi-store setups, ensuring images still in use elsewhere aren't accidentally deleted.
Public Methods
- validate()