Interface
SampleInterface
Magento\Downloadable\Api\Data\SampleInterface
What it does
This interface defines the contract for downloadable product samples in Magento 2.
Developers use it to create, retrieve, and manipulate sample files or URLs that customers can preview before purchasing downloadable products.
It supports both file uploads and external URLs, along with metadata like titles and sort order for organizing samples in the storefront.
Public Methods
- getId()
- setId()
- getTitle()
- setTitle()
- getSortOrder()
- setSortOrder()
- getSampleType()
- setSampleType()
- getSampleFile()
- setSampleFile()
- getSampleFileContent()
- setSampleFileContent()
- getSampleUrl()
- setSampleUrl()
- getExtensionAttributes()
- setExtensionAttributes()