Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
__construct (\Magento\Catalog\Api\CategoryRepositoryInterface $categoryRepository, \Magento\Catalog\Api\ProductRepositoryInterface $productRepository) | |
save (\Magento\Catalog\Api\Data\CategoryProductLinkInterface $productLink) | |
delete (\Magento\Catalog\Api\Data\CategoryProductLinkInterface $productLink) | |
deleteByIds ($categoryId, $sku) | |
Protected Attributes | |
$categoryRepository | |
$productRepository | |
Definition at line 12 of file CategoryLinkRepository.php.
__construct | ( | \Magento\Catalog\Api\CategoryRepositoryInterface | $categoryRepository, |
\Magento\Catalog\Api\ProductRepositoryInterface | $productRepository | ||
) |
\Magento\Catalog\Api\CategoryRepositoryInterface | $categoryRepository | |
\Magento\Catalog\Api\ProductRepositoryInterface | $productRepository |
Definition at line 28 of file CategoryLinkRepository.php.
delete | ( | \Magento\Catalog\Api\Data\CategoryProductLinkInterface | $productLink | ) |
{Remove the product assignment from the category
\Magento\Catalog\Api\Data\CategoryProductLinkInterface | $productLink |
Implements CategoryLinkRepositoryInterface.
Definition at line 65 of file CategoryLinkRepository.php.
deleteByIds | ( | $categoryId, | |
$sku | |||
) |
{Remove the product assignment from the category by category id and sku
string | $sku | |
string | $sku |
Implements CategoryLinkRepositoryInterface.
Definition at line 73 of file CategoryLinkRepository.php.
save | ( | \Magento\Catalog\Api\Data\CategoryProductLinkInterface | $productLink | ) |
{Assign a product to the required category
\Magento\Catalog\Api\Data\CategoryProductLinkInterface | $productLink |
Implements CategoryLinkRepositoryInterface.
Definition at line 39 of file CategoryLinkRepository.php.
|
protected |
Definition at line 17 of file CategoryLinkRepository.php.
|
protected |
Definition at line 22 of file CategoryLinkRepository.php.