11 ->setTypeId(\
Magento\Downloadable\Model\Product\Type::TYPE_DOWNLOADABLE)
13 ->setAttributeSetId(4)
15 ->setName(
'Downloadable Product')
16 ->setSku(
'downloadable-product')
18 ->setVisibility(\
Magento\Catalog\Model\Product\Visibility::VISIBILITY_BOTH)
19 ->setStatus(\
Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED)
20 ->setLinksPurchasedSeparately(
true)
33 ->get(\
Magento\Downloadable\Api\Data\LinkInterfaceFactory::class);
36 'title' =>
'Downloadable Product Link',
39 'link_url' =>
'http://example.com/downloadable.txt',
49 $link->setSortOrder(1);
51 $link->setNumberOfDownloads(0);
58 ->get(\
Magento\Catalog\Api\ProductRepositoryInterface::class);
const LINK_SHAREABLE_CONFIG
static getObjectManager()