Model
Gallery
Magento\Catalog\Model\ResourceModel\Product\Gallery
What it does
This resource model manages database operations for product media gallery images in Magento 2.
Developers use it to load, save, duplicate, and delete product images and their store-specific values across the catalog_product_entity_media_gallery tables.
It handles the relationship between gallery images and products, including multi-store configurations and image attribute data.
Public Methods
- getConnection()
- loadDataFromTableByValueId()
- loadProductGalleryByAttributeId()
- createBatchBaseSelect()
- getMainTableAlias()
- bindValueToEntity()
- saveDataRow()
- insertGallery()
- deleteGallery()
- insertGalleryValueInStore()
- deleteGalleryValueInStore()
- duplicate()
- getProductImages()
- countImageUses()