Interceptor.php 1.53 KB
Newer Older
Ketan's avatar
Ketan committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
<?php
namespace Magento\InventoryConfiguration\Model\GetStockItemConfiguration;

/**
 * Interceptor class for @see \Magento\InventoryConfiguration\Model\GetStockItemConfiguration
 */
class Interceptor extends \Magento\InventoryConfiguration\Model\GetStockItemConfiguration implements \Magento\Framework\Interception\InterceptorInterface
{
    use \Magento\Framework\Interception\Interceptor;

    public function __construct(\Magento\InventoryConfiguration\Model\GetLegacyStockItem $getLegacyStockItem, \Magento\InventoryConfiguration\Model\StockItemConfigurationFactory $stockItemConfigurationFactory, \Magento\InventoryApi\Model\IsProductAssignedToStockInterface $isProductAssignedToStock, \Magento\InventoryCatalogApi\Api\DefaultStockProviderInterface $defaultStockProvider, \Magento\InventoryConfigurationApi\Model\IsSourceItemManagementAllowedForSkuInterface $isSourceItemManagementAllowedForSku)
    {
        $this->___init();
        parent::__construct($getLegacyStockItem, $stockItemConfigurationFactory, $isProductAssignedToStock, $defaultStockProvider, $isSourceItemManagementAllowedForSku);
    }

    /**
     * {@inheritdoc}
     */
    public function execute(string $sku, int $stockId) : \Magento\InventoryConfigurationApi\Api\Data\StockItemConfigurationInterface
    {
        $pluginInfo = $this->pluginList->getNext($this->subjectType, 'execute');
        if (!$pluginInfo) {
            return parent::execute($sku, $stockId);
        } else {
            return $this->___callPlugins('execute', func_get_args(), $pluginInfo);
        }
    }
}