Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Data Fields | |
const | XML_PATH_LINKS_TITLE = 'catalog/downloadable/links_title' |
const | XML_PATH_DEFAULT_DOWNLOADS_NUMBER = 'catalog/downloadable/downloads_number' |
const | XML_PATH_TARGET_NEW_WINDOW = 'catalog/downloadable/links_target_new_window' |
const | XML_PATH_CONFIG_IS_SHAREABLE = 'catalog/downloadable/shareable' |
const | LINK_SHAREABLE_YES = 1 |
const | LINK_SHAREABLE_NO = 0 |
const | LINK_SHAREABLE_CONFIG = 2 |
const | KEY_TITLE = 'title' |
const | KEY_SORT_ORDER = 'sort_order' |
const | KEY_IS_SHAREABLE = 'is_shareable' |
const | KEY_PRICE = 'price' |
const | KEY_NUMBER_OF_DOWNLOADS = 'number_of_downloads' |
const | KEY_LINK_TYPE = 'link_type' |
const | KEY_LINK_FILE = 'link_file' |
const | KEY_LINK_FILE_CONTENT = 'link_file_content' |
const | KEY_LINK_URL = 'link_url' |
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' |
![]() | |
const | CUSTOM_ATTRIBUTES = 'custom_attributes' |
![]() | |
const | EXTENSION_ATTRIBUTES_KEY = 'extension_attributes' |
Protected Member Functions | |
_construct () | |
![]() | |
filterCustomAttributes ($data) | |
initializeCustomAttributes () | |
convertCustomAttributeValues (array &$customAttributes) | |
getCustomAttributesCodes () | |
_setExtensionAttributes (\Magento\Framework\Api\ExtensionAttributesInterface $extensionAttributes) | |
_getExtensionAttributes () | |
![]() | |
_construct () | |
_init ($resourceModel) | |
_setResourceModel ($resourceName, $collectionName=null) | |
_getResource () | |
_getEventData () | |
_beforeLoad ($modelId, $field=null) | |
_afterLoad () | |
_hasModelChanged () | |
_getValidatorBeforeSave () | |
_createValidatorBeforeSave () | |
_getValidationRulesBeforeSave () | |
_clearReferences () | |
_clearData () | |
![]() | |
_getData ($key) | |
_underscore ($name) | |
Additional Inherited Members | |
![]() | |
$extensionAttributesFactory | |
$extensionAttributes | |
$customAttributeFactory | |
$customAttributesCodes = null | |
$customAttributesChanged = false | |
![]() | |
$_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 = [] | |
![]() | |
$_data = [] | |
![]() | |
static | $_underscoreCache = [] |
Downloadable link model
@api @method int getProductId() @method Link setProductId(int $value)
@api
__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 64 of file Link.php.
|
protected |
getBasePath | ( | ) |
getBaseSamplePath | ( | ) |
getBaseSampleTmpPath | ( | ) |
getBaseTmpPath | ( | ) |
getExtensionAttributes | ( | ) |
{Retrieve existing extension attributes object or create a new one.
Implements LinkInterface.
Definition at line 417 of file Link.php.
getIsShareable | ( | ) |
{Link shareable status 0 – No 1 – Yes 2 – Use config default value
Implements LinkInterface.
Definition at line 178 of file Link.php.
getLinkFile | ( | ) |
{Return file path or null when type is 'url'
Implements LinkInterface.
Definition at line 214 of file Link.php.
getLinkFileContent | ( | ) |
Return file content
Implements LinkInterface.
Definition at line 224 of file Link.php.
getLinkType | ( | ) |
{
Implements LinkInterface.
Definition at line 205 of file Link.php.
getLinkUrl | ( | ) |
{Return link url or null when type is 'file'
Implements LinkInterface.
Definition at line 233 of file Link.php.
getNumberOfDownloads | ( | ) |
{Number of downloads per user Null for unlimited downloads
Implements LinkInterface.
Definition at line 196 of file Link.php.
getPrice | ( | ) |
{Link price
Implements LinkInterface.
Definition at line 169 of file Link.php.
getSampleFile | ( | ) |
{Return file path or null when type is 'url'
Implements LinkInterface.
Definition at line 251 of file Link.php.
getSampleFileContent | ( | ) |
Return sample file content when type is 'file'
Implements LinkInterface.
Definition at line 261 of file Link.php.
getSampleType | ( | ) |
{
Implements LinkInterface.
Definition at line 242 of file Link.php.
getSampleUrl | ( | ) |
{Return URL or NULL when type is 'file'
Implements LinkInterface.
Definition at line 270 of file Link.php.
getSearchableData | ( | $productId, | |
$storeId | |||
) |
Retrieve links searchable data
int | $productId | |
int | $storeId |
Implements ComponentInterface.
Definition at line 151 of file Link.php.
getSortOrder | ( | ) |
{
Implements LinkInterface.
Definition at line 187 of file Link.php.
getTitle | ( | ) |
{
Implements LinkInterface.
Definition at line 160 of file Link.php.
setExtensionAttributes | ( | \Magento\Downloadable\Api\Data\LinkExtensionInterface | $extensionAttributes | ) |
{Set an extension attributes object.
\Magento\Downloadable\Api\Data\LinkExtensionInterface | $extensionAttributes |
\Magento\Downloadable\Api\Data\LinkExtensionInterface | $extensionAttributes |
Implements LinkInterface.
Definition at line 428 of file Link.php.
setIsShareable | ( | $isShareable | ) |
int | $isShareable |
Implements LinkInterface.
Definition at line 299 of file Link.php.
setLinkFile | ( | $linkFile | ) |
Set file path or null when type is 'url'
string | $linkFile |
Implements LinkInterface.
Definition at line 342 of file Link.php.
setLinkFileContent | ( | \Magento\Downloadable\Api\Data\File\ContentInterface | $linkFileContent = null | ) |
Set file content
\Magento\Downloadable\Api\Data\File\ContentInterface | $linkFileContent |
Definition at line 353 of file Link.php.
setLinkType | ( | $linkType | ) |
string | $linkType |
Implements LinkInterface.
Definition at line 331 of file Link.php.
setLinkUrl | ( | $linkUrl | ) |
Set URL
string | $linkUrl |
Implements LinkInterface.
Definition at line 364 of file Link.php.
setNumberOfDownloads | ( | $numberOfDownloads | ) |
Set number of downloads per user Null for unlimited downloads
int | $numberOfDownloads |
Implements LinkInterface.
Definition at line 322 of file Link.php.
setPrice | ( | $price | ) |
Set link price
float | $price |
Implements LinkInterface.
Definition at line 310 of file Link.php.
setSampleFile | ( | $sampleFile | ) |
Set file path
string | $sampleFile |
Implements LinkInterface.
Definition at line 384 of file Link.php.
setSampleFileContent | ( | \Magento\Downloadable\Api\Data\File\ContentInterface | $sampleFileContent = null | ) |
Set sample file content
\Magento\Downloadable\Api\Data\File\ContentInterface | $sampleFileContent |
Definition at line 395 of file Link.php.
setSampleType | ( | $sampleType | ) |
string | $sampleType |
Implements LinkInterface.
Definition at line 373 of file Link.php.
setSampleUrl | ( | $sampleUrl | ) |
Set URL
string | $sampleUrl |
Implements LinkInterface.
Definition at line 407 of file Link.php.
setSortOrder | ( | $sortOrder | ) |
int | $sortOrder |
Implements LinkInterface.
Definition at line 290 of file Link.php.
setTitle | ( | $title | ) |
string | $title |
Implements LinkInterface.
Definition at line 281 of file Link.php.
const XML_PATH_CONFIG_IS_SHAREABLE = 'catalog/downloadable/shareable' |
const XML_PATH_DEFAULT_DOWNLOADS_NUMBER = 'catalog/downloadable/downloads_number' |
const XML_PATH_LINKS_TITLE = 'catalog/downloadable/links_title' |
const XML_PATH_TARGET_NEW_WINDOW = 'catalog/downloadable/links_target_new_window' |