|
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Data Fields | |
| const | XML_PATH_SAMPLES_TITLE = 'catalog/downloadable/samples_title' |
| const | KEY_TITLE = 'title' |
| const | KEY_SORT_ORDER = 'sort_order' |
| const | KEY_SAMPLE_TYPE = 'sample_type' |
| const | KEY_SAMPLE_FILE = 'sample_file' |
| const | KEY_SAMPLE_FILE_CONTENT = 'sample_file_content' |
| const | KEY_SAMPLE_URL = 'sample_url' |
Data Fields inherited from CustomAttributesDataInterface | |
| const | CUSTOM_ATTRIBUTES = 'custom_attributes' |
Data Fields inherited from ExtensibleDataInterface | |
| const | EXTENSION_ATTRIBUTES_KEY = 'extension_attributes' |
Protected Member Functions | |
| _construct () | |
Protected Member Functions inherited from AbstractExtensibleModel | |
| filterCustomAttributes ($data) | |
| initializeCustomAttributes () | |
| convertCustomAttributeValues (array &$customAttributes) | |
| getCustomAttributesCodes () | |
| _setExtensionAttributes (\Magento\Framework\Api\ExtensionAttributesInterface $extensionAttributes) | |
| _getExtensionAttributes () | |
Protected Member Functions inherited from AbstractModel | |
| _construct () | |
| _init ($resourceModel) | |
| _setResourceModel ($resourceName, $collectionName=null) | |
| _getResource () | |
| _getEventData () | |
| _beforeLoad ($modelId, $field=null) | |
| _afterLoad () | |
| _hasModelChanged () | |
| _getValidatorBeforeSave () | |
| _createValidatorBeforeSave () | |
| _getValidationRulesBeforeSave () | |
| _clearReferences () | |
| _clearData () | |
Protected Member Functions inherited from DataObject | |
| _getData ($key) | |
| _underscore ($name) | |
Additional Inherited Members | |
Protected Attributes inherited from AbstractExtensibleModel | |
| $extensionAttributesFactory | |
| $extensionAttributes | |
| $customAttributeFactory | |
| $customAttributesCodes = null | |
| $customAttributesChanged = false | |
Protected Attributes inherited from AbstractModel | |
| $_eventPrefix = 'core_abstract' | |
| $_eventObject = 'object' | |
| $_idFieldName = 'id' | |
| $_hasDataChanges = false | |
| $_origData | |
| $_isDeleted = false | |
| $_resource | |
| $_resourceCollection | |
| $_resourceName | |
| $_collectionName | |
| $_cacheTag = false | |
| $_dataSaveAllowed = true | |
| $_isObjectNew = null | |
| $_validatorBeforeSave = null | |
| $_eventManager | |
| $_cacheManager | |
| $_registry | |
| $_logger | |
| $_appState | |
| $_actionValidator | |
| $storedData = [] | |
Protected Attributes inherited from DataObject | |
| $_data = [] | |
Static Protected Attributes inherited from DataObject | |
| static | $_underscoreCache = [] |
Downloadable sample model
@method int getProductId()
@api
Definition at line 18 of file Sample.php.
| __construct | ( | \Magento\Framework\Model\Context | $context, |
| \Magento\Framework\Registry | $registry, | ||
| \Magento\Framework\Api\ExtensionAttributesFactory | $extensionFactory, | ||
| \Magento\Framework\Api\AttributeValueFactory | $customAttributeFactory, | ||
| \Magento\Framework\Model\ResourceModel\AbstractResource | $resource = null, |
||
| \Magento\Framework\Data\Collection\AbstractDb | $resourceCollection = null, |
||
| array | $data = [] |
||
| ) |
#-
| \Magento\Framework\Model\Context | $context | |
| \Magento\Framework\Registry | $registry | |
| \Magento\Framework\Api\ExtensionAttributesFactory | $extensionFactory | |
| \Magento\Framework\Api\AttributeValueFactory | $customAttributeFactory | |
| \Magento\Framework\Model\ResourceModel\AbstractResource | $resource | |
| \Magento\Framework\Data\Collection\AbstractDb | $resourceCollection | |
| array | $data |
Definition at line 42 of file Sample.php.
|
protected |
| afterSave | ( | ) |
| getBasePath | ( | ) |
Retrieve sample files path
Implements ComponentInterface.
Definition at line 113 of file Sample.php.
| getBaseTmpPath | ( | ) |
Retrieve base tmp path
Implements ComponentInterface.
Definition at line 103 of file Sample.php.
| getExtensionAttributes | ( | ) |
{Retrieve existing extension attributes object or create a new one.
Implements SampleInterface.
Definition at line 253 of file Sample.php.
| getSampleFile | ( | ) |
{Return file path or null when type is 'url'
Implements SampleInterface.
Definition at line 161 of file Sample.php.
| getSampleFileContent | ( | ) |
{Retrieve sample file content
Implements SampleInterface.
Definition at line 170 of file Sample.php.
| getSampleType | ( | ) |
{
Implements SampleInterface.
Definition at line 152 of file Sample.php.
| getSampleUrl | ( | ) |
{Return URL or NULL when type is 'file'
Implements SampleInterface.
Definition at line 179 of file Sample.php.
| getSearchableData | ( | $productId, | |
| $storeId | |||
| ) |
Retrieve links searchable data
| int | $productId | |
| int | $storeId |
Implements ComponentInterface.
Definition at line 125 of file Sample.php.
| getSortOrder | ( | ) |
{Sort order index for sample
Implements SampleInterface.
Definition at line 143 of file Sample.php.
| getTitle | ( | ) |
{Sample title
Implements SampleInterface.
Definition at line 134 of file Sample.php.
| getUrl | ( | ) |
| setExtensionAttributes | ( | \Magento\Downloadable\Api\Data\SampleExtensionInterface | $extensionAttributes | ) |
{Set an extension attributes object.
| \Magento\Downloadable\Api\Data\SampleExtensionInterface | $extensionAttributes |
| \Magento\Downloadable\Api\Data\SampleExtensionInterface | $extensionAttributes |
Implements SampleInterface.
Definition at line 264 of file Sample.php.
| setSampleFile | ( | $sampleFile | ) |
Set file path or null when type is 'url'
| string | $sampleFile |
Implements SampleInterface.
Definition at line 221 of file Sample.php.
| setSampleFileContent | ( | \Magento\Downloadable\Api\Data\File\ContentInterface | $sampleFileContent = null | ) |
Set sample file content
| \Magento\Downloadable\Api\Data\File\ContentInterface | $sampleFileContent |
Definition at line 232 of file Sample.php.
| setSampleType | ( | $sampleType | ) |
| string | $sampleType |
Implements SampleInterface.
Definition at line 210 of file Sample.php.
| setSampleUrl | ( | $sampleUrl | ) |
Set sample URL
| string | $sampleUrl |
Implements SampleInterface.
Definition at line 243 of file Sample.php.
| setSortOrder | ( | $sortOrder | ) |
Set sort order index for sample
| int | $sortOrder |
Implements SampleInterface.
Definition at line 201 of file Sample.php.
| setTitle | ( | $title | ) |
Set sample title
| string | $title |
Implements SampleInterface.
Definition at line 190 of file Sample.php.
| const KEY_SAMPLE_FILE = 'sample_file' |
Definition at line 28 of file Sample.php.
| const KEY_SAMPLE_FILE_CONTENT = 'sample_file_content' |
Definition at line 29 of file Sample.php.
| const KEY_SAMPLE_TYPE = 'sample_type' |
Definition at line 27 of file Sample.php.
| const KEY_SAMPLE_URL = 'sample_url' |
Definition at line 30 of file Sample.php.
| const KEY_SORT_ORDER = 'sort_order' |
Definition at line 26 of file Sample.php.
| const KEY_TITLE = 'title' |
#+ Constants for field names
Definition at line 25 of file Sample.php.
| const XML_PATH_SAMPLES_TITLE = 'catalog/downloadable/samples_title' |
Definition at line 20 of file Sample.php.