Skip to content

Instantly share code, notes, and snippets.

@xyphoid
Created June 21, 2016 05:16
Show Gist options
  • Save xyphoid/2ad535288acc443658fdd26586244adc to your computer and use it in GitHub Desktop.
Save xyphoid/2ad535288acc443658fdd26586244adc to your computer and use it in GitHub Desktop.
/**
* @param \Magento\Framework\Model\Context $context
* @param \Magento\Framework\Registry $registry
* @param \Magento\Framework\Api\ExtensionAttributesFactory $extensionFactory
* @param AttributeValueFactory $customAttributeFactory
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
* @param \Magento\Catalog\Api\ProductAttributeRepositoryInterface $metadataService
* @param Product\Url $url
* @param Product\Link $productLink
* @param Product\Configuration\Item\OptionFactory $itemOptionFactory
* @param \Magento\CatalogInventory\Api\Data\StockItemInterfaceFactory $stockItemFactory
* @param Product\OptionFactory $catalogProductOptionFactory
* @param Product\Visibility $catalogProductVisibility
* @param Product\Attribute\Source\Status $catalogProductStatus
* @param Product\Media\Config $catalogProductMediaConfig
* @param Product\Type $catalogProductType
* @param \Magento\Framework\Module\Manager $moduleManager
* @param \Magento\Catalog\Helper\Product $catalogProduct
* @param \Magento\Catalog\Model\ResourceModel\Product $resource
* @param \Magento\Catalog\Model\ResourceModel\Product\Collection $resourceCollection
* @param \Magento\Framework\Data\CollectionFactory $collectionFactory
* @param \Magento\Framework\Filesystem $filesystem
* @param \Magento\Framework\Indexer\IndexerRegistry $indexerRegistry
* @param Indexer\Product\Flat\Processor $productFlatIndexerProcessor
* @param Indexer\Product\Price\Processor $productPriceIndexerProcessor
* @param Indexer\Product\Eav\Processor $productEavIndexerProcessor
* @param CategoryRepositoryInterface $categoryRepository
* @param Product\Image\CacheFactory $imageCacheFactory
* @param ProductLink\CollectionProvider $entityCollectionProvider
* @param Product\LinkTypeProvider $linkTypeProvider
* @param \Magento\Catalog\Api\Data\ProductLinkInterfaceFactory $productLinkFactory
* @param \Magento\Catalog\Api\Data\ProductLinkExtensionFactory $productLinkExtensionFactory
* @param EntryConverterPool $mediaGalleryEntryConverterPool
* @param \Magento\Framework\Api\DataObjectHelper $dataObjectHelper
* @param \Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface $joinProcessor
* @param array $data
*
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
*/
public function __construct(
\Magento\Framework\Model\Context $context,
\Magento\Framework\Registry $registry,
\Magento\Framework\Api\ExtensionAttributesFactory $extensionFactory,
AttributeValueFactory $customAttributeFactory,
\Magento\Store\Model\StoreManagerInterface $storeManager,
\Magento\Catalog\Api\ProductAttributeRepositoryInterface $metadataService,
Product\Url $url,
Product\Link $productLink,
\Magento\Catalog\Model\Product\Configuration\Item\OptionFactory $itemOptionFactory,
\Magento\CatalogInventory\Api\Data\StockItemInterfaceFactory $stockItemFactory,
\Magento\Catalog\Model\Product\OptionFactory $catalogProductOptionFactory,
\Magento\Catalog\Model\Product\Visibility $catalogProductVisibility,
\Magento\Catalog\Model\Product\Attribute\Source\Status $catalogProductStatus,
\Magento\Catalog\Model\Product\Media\Config $catalogProductMediaConfig,
Product\Type $catalogProductType,
\Magento\Framework\Module\Manager $moduleManager,
\Magento\Catalog\Helper\Product $catalogProduct,
\Magento\Catalog\Model\ResourceModel\Product $resource,
\Magento\Catalog\Model\ResourceModel\Product\Collection $resourceCollection,
\Magento\Framework\Data\CollectionFactory $collectionFactory,
\Magento\Framework\Filesystem $filesystem,
\Magento\Framework\Indexer\IndexerRegistry $indexerRegistry,
\Magento\Catalog\Model\Indexer\Product\Flat\Processor $productFlatIndexerProcessor,
\Magento\Catalog\Model\Indexer\Product\Price\Processor $productPriceIndexerProcessor,
\Magento\Catalog\Model\Indexer\Product\Eav\Processor $productEavIndexerProcessor,
CategoryRepositoryInterface $categoryRepository,
Product\Image\CacheFactory $imageCacheFactory,
\Magento\Catalog\Model\ProductLink\CollectionProvider $entityCollectionProvider,
\Magento\Catalog\Model\Product\LinkTypeProvider $linkTypeProvider,
\Magento\Catalog\Api\Data\ProductLinkInterfaceFactory $productLinkFactory,
\Magento\Catalog\Api\Data\ProductLinkExtensionFactory $productLinkExtensionFactory,
EntryConverterPool $mediaGalleryEntryConverterPool,
\Magento\Framework\Api\DataObjectHelper $dataObjectHelper,
\Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface $joinProcessor,
array $data = []
) {
$this->metadataService = $metadataService;
$this->_itemOptionFactory = $itemOptionFactory;
$this->_stockItemFactory = $stockItemFactory;
$this->optionFactory = $catalogProductOptionFactory;
$this->_catalogProductVisibility = $catalogProductVisibility;
$this->_catalogProductStatus = $catalogProductStatus;
$this->_catalogProductMediaConfig = $catalogProductMediaConfig;
$this->_catalogProductType = $catalogProductType;
$this->moduleManager = $moduleManager;
$this->_catalogProduct = $catalogProduct;
$this->_collectionFactory = $collectionFactory;
$this->_urlModel = $url;
$this->_linkInstance = $productLink;
$this->_filesystem = $filesystem;
$this->indexerRegistry = $indexerRegistry;
$this->_productFlatIndexerProcessor = $productFlatIndexerProcessor;
$this->_productPriceIndexerProcessor = $productPriceIndexerProcessor;
$this->_productEavIndexerProcessor = $productEavIndexerProcessor;
$this->categoryRepository = $categoryRepository;
$this->imageCacheFactory = $imageCacheFactory;
$this->entityCollectionProvider = $entityCollectionProvider;
$this->linkTypeProvider = $linkTypeProvider;
$this->productLinkFactory = $productLinkFactory;
$this->productLinkExtensionFactory = $productLinkExtensionFactory;
$this->mediaGalleryEntryConverterPool = $mediaGalleryEntryConverterPool;
$this->dataObjectHelper = $dataObjectHelper;
$this->joinProcessor = $joinProcessor;
parent::__construct(
$context,
$registry,
$extensionFactory,
$customAttributeFactory,
$storeManager,
$resource,
$resourceCollection,
$data
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment