|
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
| __construct (\Magento\Catalog\Api\ProductRepositoryInterface $productRepository, \Magento\Bundle\Model\Product\Type $type, \Magento\Bundle\Api\Data\OptionInterfaceFactory $optionFactory, \Magento\Bundle\Model\ResourceModel\Option $optionResource, \Magento\Bundle\Api\ProductLinkManagementInterface $linkManagement, \Magento\Bundle\Model\Product\OptionList $productOptionList, \Magento\Framework\Api\DataObjectHelper $dataObjectHelper, SaveAction $optionSave) | |
| getList ($sku) | |
| getListByProduct (ProductInterface $product) | |
| delete (\Magento\Bundle\Api\Data\OptionInterface $option) | |
| deleteById ($sku, $optionId) | |
| save (\Magento\Catalog\Api\Data\ProductInterface $product, \Magento\Bundle\Api\Data\OptionInterface $option) | |
Public Member Functions inherited from ProductOptionRepositoryInterface | |
| get ($sku, $optionId) | |
| delete (\Magento\Bundle\Api\Data\OptionInterface $option) | |
| save (\Magento\Catalog\Api\Data\ProductInterface $product, \Magento\Bundle\Api\Data\OptionInterface $option) | |
Protected Attributes | |
| $productRepository | |
| $type | |
| $optionFactory | |
| $optionResource | |
| $linkManagement | |
| $productOptionList | |
| $dataObjectHelper | |
Repository for performing CRUD operations for a bundle product's options.
@SuppressWarnings(PHPMD.CouplingBetweenObjects)
Definition at line 20 of file OptionRepository.php.
| __construct | ( | \Magento\Catalog\Api\ProductRepositoryInterface | $productRepository, |
| \Magento\Bundle\Model\Product\Type | $type, | ||
| \Magento\Bundle\Api\Data\OptionInterfaceFactory | $optionFactory, | ||
| \Magento\Bundle\Model\ResourceModel\Option | $optionResource, | ||
| \Magento\Bundle\Api\ProductLinkManagementInterface | $linkManagement, | ||
| \Magento\Bundle\Model\Product\OptionList | $productOptionList, | ||
| \Magento\Framework\Api\DataObjectHelper | $dataObjectHelper, | ||
| SaveAction | $optionSave | ||
| ) |
| \Magento\Catalog\Api\ProductRepositoryInterface | $productRepository | |
| Product\Type | $type | |
| \Magento\Bundle\Api\Data\OptionInterfaceFactory | $optionFactory | |
| \Magento\Bundle\Model\ResourceModel\Option | $optionResource | |
| \Magento\Bundle\Api\ProductLinkManagementInterface | $linkManagement | |
| Product\OptionList | $productOptionList | |
| \Magento\Framework\Api\DataObjectHelper | $dataObjectHelper | |
| SaveAction | $optionSave |
Definition at line 72 of file OptionRepository.php.
| delete | ( | \Magento\Bundle\Api\Data\OptionInterface | $option | ) |
| deleteById | ( | $sku, | |
| $id | |||
| ) |
{Remove bundle option
| string | $sku | |
| int | $optionId |
Implements ProductOptionRepositoryInterface.
Definition at line 161 of file OptionRepository.php.
| getList | ( | $sku | ) |
{Get all options for bundle product
| string | $sku |
Implements ProductOptionRepositoryInterface.
Definition at line 127 of file OptionRepository.php.
| getListByProduct | ( | ProductInterface | $product | ) |
| ProductInterface | $product |
Definition at line 137 of file OptionRepository.php.
| save | ( | \Magento\Catalog\Api\Data\ProductInterface | $product, |
| \Magento\Bundle\Api\Data\OptionInterface | $option | ||
| ) |
{}
{} @SuppressWarnings(PHPMD.CyclomaticComplexity)
Definition at line 174 of file OptionRepository.php.
|
protected |
Definition at line 55 of file OptionRepository.php.
|
protected |
Definition at line 45 of file OptionRepository.php.
|
protected |
Definition at line 35 of file OptionRepository.php.
|
protected |
Definition at line 40 of file OptionRepository.php.
|
protected |
Definition at line 50 of file OptionRepository.php.
|
protected |
Definition at line 25 of file OptionRepository.php.
|
protected |
Definition at line 30 of file OptionRepository.php.