本文整理匯總了PHP中Magento\Sales\Model\AbstractModel::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP AbstractModel::__construct方法的具體用法?PHP AbstractModel::__construct怎麽用?PHP AbstractModel::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Magento\Sales\Model\AbstractModel
的用法示例。
在下文中一共展示了AbstractModel::__construct方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __construct
/**
* @param \Magento\Framework\Model\Context $context
* @param \Magento\Framework\Registry $registry
* @param \Magento\Framework\Api\ExtensionAttributesFactory $extensionFactory
* @param \Magento\Framework\Api\AttributeValueFactory $customAttributeFactory
* @param \Magento\Sales\Model\OrderFactory $orderFactory
* @param \Magento\Directory\Model\RegionFactory $regionFactory
* @param \Magento\Framework\Model\ResourceModel\AbstractResource $resource
* @param \Magento\Framework\Data\Collection\AbstractDb $resourceCollection
* @param array $data
*/
public function __construct(\Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Framework\Api\ExtensionAttributesFactory $extensionFactory, \Magento\Framework\Api\AttributeValueFactory $customAttributeFactory, \Magento\Sales\Model\OrderFactory $orderFactory, \Magento\Directory\Model\RegionFactory $regionFactory, \Magento\Framework\Model\ResourceModel\AbstractResource $resource = null, \Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null, array $data = [])
{
$data = $this->implodeStreetField($data);
$this->regionFactory = $regionFactory;
$this->orderFactory = $orderFactory;
parent::__construct($context, $registry, $extensionFactory, $customAttributeFactory, $resource, $resourceCollection, $data);
}
示例2: __construct
/**
* @param \Magento\Framework\Model\Context $context
* @param \Magento\Framework\Registry $registry
* @param \Magento\Framework\Api\ExtensionAttributesFactory $extensionFactory
* @param AttributeValueFactory $customAttributeFactory
* @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $timezone
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
* @param Order\Config $orderConfig
* @param \Magento\Catalog\Api\ProductRepositoryInterface $productRepository
* @param Resource\Order\Item\CollectionFactory $orderItemCollectionFactory
* @param \Magento\Catalog\Model\Product\Visibility $productVisibility
* @param Service\OrderFactory $serviceOrderFactory
* @param \Magento\Directory\Model\CurrencyFactory $currencyFactory
* @param \Magento\Eav\Model\Config $eavConfig
* @param Order\Status\HistoryFactory $orderHistoryFactory
* @param Resource\Order\Address\CollectionFactory $addressCollectionFactory
* @param Resource\Order\Payment\CollectionFactory $paymentCollectionFactory
* @param Resource\Order\Status\History\CollectionFactory $historyCollectionFactory
* @param Resource\Order\Invoice\CollectionFactory $invoiceCollectionFactory
* @param Resource\Order\Shipment\CollectionFactory $shipmentCollectionFactory
* @param Resource\Order\Creditmemo\CollectionFactory $memoCollectionFactory
* @param Resource\Order\Shipment\Track\CollectionFactory $trackCollectionFactory
* @param PriceCurrencyInterface $priceCurrency
* @param \Magento\Catalog\Model\Resource\Product\CollectionFactory $productListFactory
* @param \Magento\Framework\Model\Resource\AbstractResource $resource
* @param \Magento\Framework\Data\Collection\AbstractDb $resourceCollection
* @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\Framework\Stdlib\DateTime\TimezoneInterface $timezone, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Sales\Model\Order\Config $orderConfig, \Magento\Catalog\Api\ProductRepositoryInterface $productRepository, \Magento\Sales\Model\Resource\Order\Item\CollectionFactory $orderItemCollectionFactory, \Magento\Catalog\Model\Product\Visibility $productVisibility, \Magento\Sales\Model\Service\OrderFactory $serviceOrderFactory, \Magento\Directory\Model\CurrencyFactory $currencyFactory, \Magento\Eav\Model\Config $eavConfig, \Magento\Sales\Model\Order\Status\HistoryFactory $orderHistoryFactory, \Magento\Sales\Model\Resource\Order\Address\CollectionFactory $addressCollectionFactory, \Magento\Sales\Model\Resource\Order\Payment\CollectionFactory $paymentCollectionFactory, \Magento\Sales\Model\Resource\Order\Status\History\CollectionFactory $historyCollectionFactory, \Magento\Sales\Model\Resource\Order\Invoice\CollectionFactory $invoiceCollectionFactory, \Magento\Sales\Model\Resource\Order\Shipment\CollectionFactory $shipmentCollectionFactory, \Magento\Sales\Model\Resource\Order\Creditmemo\CollectionFactory $memoCollectionFactory, \Magento\Sales\Model\Resource\Order\Shipment\Track\CollectionFactory $trackCollectionFactory, PriceCurrencyInterface $priceCurrency, \Magento\Catalog\Model\Resource\Product\CollectionFactory $productListFactory, \Magento\Framework\Model\Resource\AbstractResource $resource = null, \Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null, array $data = [])
{
$this->_storeManager = $storeManager;
$this->_orderConfig = $orderConfig;
$this->productRepository = $productRepository;
$this->productListFactory = $productListFactory;
$this->timezone = $timezone;
$this->_orderItemCollectionFactory = $orderItemCollectionFactory;
$this->_productVisibility = $productVisibility;
$this->_serviceOrderFactory = $serviceOrderFactory;
$this->_currencyFactory = $currencyFactory;
$this->_eavConfig = $eavConfig;
$this->_orderHistoryFactory = $orderHistoryFactory;
$this->_addressCollectionFactory = $addressCollectionFactory;
$this->_paymentCollectionFactory = $paymentCollectionFactory;
$this->_historyCollectionFactory = $historyCollectionFactory;
$this->_invoiceCollectionFactory = $invoiceCollectionFactory;
$this->_shipmentCollectionFactory = $shipmentCollectionFactory;
$this->_memoCollectionFactory = $memoCollectionFactory;
$this->_trackCollectionFactory = $trackCollectionFactory;
$this->priceCurrency = $priceCurrency;
parent::__construct($context, $registry, $extensionFactory, $customAttributeFactory, $resource, $resourceCollection, $data);
}
示例3: __construct
/**
* @param \Magento\Framework\Model\Context $context
* @param \Magento\Framework\Registry $registry
* @param \Magento\Framework\Api\ExtensionAttributesFactory $extensionFactory
* @param AttributeValueFactory $customAttributeFactory
* @param \Magento\Sales\Model\Order\PaymentFactory $paymentFactory
* @param \Magento\Sales\Model\OrderFactory $orderFactory
* @param \Magento\Framework\Stdlib\DateTime\DateTimeFactory $dateFactory
* @param TransactionFactory $transactionFactory
* @param \Magento\Framework\Model\Resource\AbstractResource $resource
* @param \Magento\Framework\Data\Collection\Db $resourceCollection
* @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\Sales\Model\Order\PaymentFactory $paymentFactory, \Magento\Sales\Model\OrderFactory $orderFactory, \Magento\Framework\Stdlib\DateTime\DateTimeFactory $dateFactory, TransactionFactory $transactionFactory, \Magento\Framework\Model\Resource\AbstractResource $resource = null, \Magento\Framework\Data\Collection\Db $resourceCollection = null, array $data = [])
{
$this->_paymentFactory = $paymentFactory;
$this->_orderFactory = $orderFactory;
$this->_dateFactory = $dateFactory;
$this->_transactionFactory = $transactionFactory;
parent::__construct($context, $registry, $extensionFactory, $customAttributeFactory, $resource, $resourceCollection, $data);
}
示例4: __construct
/**
* @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\Framework\Model\ResourceModel\AbstractResource $resource
* @param \Magento\Framework\Data\Collection\AbstractDb $resourceCollection
* @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\Framework\Model\ResourceModel\AbstractResource $resource = null, \Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null, array $data = [])
{
parent::__construct($context, $registry, $extensionFactory, $customAttributeFactory, $resource, $resourceCollection, $data);
$this->_storeManager = $storeManager;
}
示例5: __construct
/**
* @param \Magento\Framework\Model\Context $context
* @param \Magento\Framework\Registry $registry
* @param \Magento\Framework\Api\ExtensionAttributesFactory $extensionFactory
* @param AttributeValueFactory $customAttributeFactory
* @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate
* @param \Magento\Framework\Stdlib\DateTime $dateTime
* @param Invoice\Config $invoiceConfig
* @param \Magento\Sales\Model\OrderFactory $orderFactory
* @param \Magento\Framework\Math\CalculatorFactory $calculatorFactory
* @param \Magento\Sales\Model\Resource\Order\Invoice\Item\CollectionFactory $invoiceItemCollectionFactory
* @param Invoice\CommentFactory $invoiceCommentFactory
* @param \Magento\Sales\Model\Resource\Order\Invoice\Comment\CollectionFactory $commentCollectionFactory
* @param \Magento\Framework\Model\Resource\AbstractResource $resource
* @param \Magento\Framework\Data\Collection\Db $resourceCollection
* @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\Framework\Stdlib\DateTime\TimezoneInterface $localeDate, \Magento\Framework\Stdlib\DateTime $dateTime, \Magento\Sales\Model\Order\Invoice\Config $invoiceConfig, \Magento\Sales\Model\OrderFactory $orderFactory, \Magento\Framework\Math\CalculatorFactory $calculatorFactory, \Magento\Sales\Model\Resource\Order\Invoice\Item\CollectionFactory $invoiceItemCollectionFactory, \Magento\Sales\Model\Order\Invoice\CommentFactory $invoiceCommentFactory, \Magento\Sales\Model\Resource\Order\Invoice\Comment\CollectionFactory $commentCollectionFactory, \Magento\Framework\Model\Resource\AbstractResource $resource = null, \Magento\Framework\Data\Collection\Db $resourceCollection = null, array $data = [])
{
$this->_invoiceConfig = $invoiceConfig;
$this->_orderFactory = $orderFactory;
$this->_calculatorFactory = $calculatorFactory;
$this->_invoiceItemCollectionFactory = $invoiceItemCollectionFactory;
$this->_invoiceCommentFactory = $invoiceCommentFactory;
$this->_commentCollectionFactory = $commentCollectionFactory;
parent::__construct($context, $registry, $extensionFactory, $customAttributeFactory, $localeDate, $dateTime, $resource, $resourceCollection, $data);
}
示例6: __construct
/**
* @param \Magento\Framework\Model\Context $context
* @param \Magento\Framework\Registry $registry
* @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate
* @param \Magento\Framework\Stdlib\DateTime $dateTime
* @param \Magento\Framework\StoreManagerInterface $storeManager
* @param Order\Config $orderConfig
* @param \Magento\Catalog\Model\ProductFactory $productFactory
* @param Resource\Order\Item\CollectionFactory $orderItemCollectionFactory
* @param \Magento\Catalog\Model\Product\Visibility $productVisibility
* @param \Magento\Tax\Model\Calculation $taxCalculation
* @param Service\OrderFactory $serviceOrderFactory
* @param \Magento\Directory\Model\CurrencyFactory $currencyFactory
* @param \Magento\Eav\Model\Config $eavConfig
* @param Order\Status\HistoryFactory $orderHistoryFactory
* @param \Magento\Tax\Model\Resource\Sales\Order\Tax\CollectionFactory $orderTaxCollectionFactory
* @param Resource\Order\Address\CollectionFactory $addressCollectionFactory
* @param Resource\Order\Payment\CollectionFactory $paymentCollectionFactory
* @param Resource\Order\Status\History\CollectionFactory $historyCollectionFactory
* @param Resource\Order\Invoice\CollectionFactory $invoiceCollectionFactory
* @param Resource\Order\Shipment\CollectionFactory $shipmentCollectionFactory
* @param Resource\Order\Creditmemo\CollectionFactory $memoCollectionFactory
* @param Resource\Order\Shipment\Track\CollectionFactory $trackCollectionFactory
* @param PriceCurrencyInterface $priceCurrency
* @param \Magento\Framework\Model\Resource\AbstractResource $resource
* @param \Magento\Framework\Data\Collection\Db $resourceCollection
* @param array $data
*/
public function __construct(\Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate, \Magento\Framework\Stdlib\DateTime $dateTime, \Magento\Framework\StoreManagerInterface $storeManager, \Magento\Sales\Model\Order\Config $orderConfig, \Magento\Catalog\Model\ProductFactory $productFactory, \Magento\Sales\Model\Resource\Order\Item\CollectionFactory $orderItemCollectionFactory, \Magento\Catalog\Model\Product\Visibility $productVisibility, \Magento\Tax\Model\Calculation $taxCalculation, \Magento\Sales\Model\Service\OrderFactory $serviceOrderFactory, \Magento\Directory\Model\CurrencyFactory $currencyFactory, \Magento\Eav\Model\Config $eavConfig, \Magento\Sales\Model\Order\Status\HistoryFactory $orderHistoryFactory, \Magento\Tax\Model\Resource\Sales\Order\Tax\CollectionFactory $orderTaxCollectionFactory, \Magento\Sales\Model\Resource\Order\Address\CollectionFactory $addressCollectionFactory, \Magento\Sales\Model\Resource\Order\Payment\CollectionFactory $paymentCollectionFactory, \Magento\Sales\Model\Resource\Order\Status\History\CollectionFactory $historyCollectionFactory, \Magento\Sales\Model\Resource\Order\Invoice\CollectionFactory $invoiceCollectionFactory, \Magento\Sales\Model\Resource\Order\Shipment\CollectionFactory $shipmentCollectionFactory, \Magento\Sales\Model\Resource\Order\Creditmemo\CollectionFactory $memoCollectionFactory, \Magento\Sales\Model\Resource\Order\Shipment\Track\CollectionFactory $trackCollectionFactory, PriceCurrencyInterface $priceCurrency, \Magento\Framework\Model\Resource\AbstractResource $resource = null, \Magento\Framework\Data\Collection\Db $resourceCollection = null, array $data = array())
{
$this->_storeManager = $storeManager;
$this->_orderConfig = $orderConfig;
$this->_productFactory = $productFactory;
$this->_orderItemCollectionFactory = $orderItemCollectionFactory;
$this->_productVisibility = $productVisibility;
$this->_taxCalculation = $taxCalculation;
$this->_serviceOrderFactory = $serviceOrderFactory;
$this->_currencyFactory = $currencyFactory;
$this->_eavConfig = $eavConfig;
$this->_orderHistoryFactory = $orderHistoryFactory;
$this->_orderTaxCollectionFactory = $orderTaxCollectionFactory;
$this->_addressCollectionFactory = $addressCollectionFactory;
$this->_paymentCollectionFactory = $paymentCollectionFactory;
$this->_historyCollectionFactory = $historyCollectionFactory;
$this->_invoiceCollectionFactory = $invoiceCollectionFactory;
$this->_shipmentCollectionFactory = $shipmentCollectionFactory;
$this->_memoCollectionFactory = $memoCollectionFactory;
$this->_trackCollectionFactory = $trackCollectionFactory;
$this->priceCurrency = $priceCurrency;
parent::__construct($context, $registry, $localeDate, $dateTime, $resource, $resourceCollection, $data);
}
示例7: __construct
/**
* @param \Magento\Framework\Model\Context $context
* @param \Magento\Framework\Registry $registry
* @param \Magento\Framework\Api\ExtensionAttributesFactory $extensionFactory
* @param AttributeValueFactory $customAttributeFactory
* @param Creditmemo\Config $creditmemoConfig
* @param \Magento\Sales\Model\OrderFactory $orderFactory
* @param \Magento\Sales\Model\ResourceModel\Order\Creditmemo\Item\CollectionFactory $cmItemCollectionFactory
* @param \Magento\Framework\Math\CalculatorFactory $calculatorFactory
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
* @param Creditmemo\CommentFactory $commentFactory
* @param \Magento\Sales\Model\ResourceModel\Order\Creditmemo\Comment\CollectionFactory $commentCollectionFactory
* @param PriceCurrencyInterface $priceCurrency
* @param \Magento\Framework\Model\ResourceModel\AbstractResource $resource
* @param \Magento\Framework\Data\Collection\AbstractDb $resourceCollection
* @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\Sales\Model\Order\Creditmemo\Config $creditmemoConfig, \Magento\Sales\Model\OrderFactory $orderFactory, \Magento\Sales\Model\ResourceModel\Order\Creditmemo\Item\CollectionFactory $cmItemCollectionFactory, \Magento\Framework\Math\CalculatorFactory $calculatorFactory, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Sales\Model\Order\Creditmemo\CommentFactory $commentFactory, \Magento\Sales\Model\ResourceModel\Order\Creditmemo\Comment\CollectionFactory $commentCollectionFactory, PriceCurrencyInterface $priceCurrency, \Magento\Framework\Model\ResourceModel\AbstractResource $resource = null, \Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null, array $data = [])
{
$this->_creditmemoConfig = $creditmemoConfig;
$this->_orderFactory = $orderFactory;
$this->_cmItemCollectionFactory = $cmItemCollectionFactory;
$this->_calculatorFactory = $calculatorFactory;
$this->_storeManager = $storeManager;
$this->_commentFactory = $commentFactory;
$this->_commentCollectionFactory = $commentCollectionFactory;
$this->priceCurrency = $priceCurrency;
parent::__construct($context, $registry, $extensionFactory, $customAttributeFactory, $resource, $resourceCollection, $data);
}
示例8: __construct
/**
* @param \Magento\Framework\Model\Context $context
* @param \Magento\Framework\Registry $registry
* @param \Magento\Framework\Api\ExtensionAttributesFactory $extensionFactory
* @param AttributeValueFactory $customAttributeFactory
* @param \Magento\Sales\Model\Order\ItemFactory $orderItemFactory
* @param \Magento\Framework\Model\ResourceModel\AbstractResource $resource
* @param \Magento\Framework\Data\Collection\AbstractDb $resourceCollection
* @param array $data
*/
public function __construct(\Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Framework\Api\ExtensionAttributesFactory $extensionFactory, AttributeValueFactory $customAttributeFactory, \Magento\Sales\Model\Order\ItemFactory $orderItemFactory, \Magento\Framework\Model\ResourceModel\AbstractResource $resource = null, \Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null, array $data = [])
{
parent::__construct($context, $registry, $extensionFactory, $customAttributeFactory, $resource, $resourceCollection, $data);
$this->_orderItemFactory = $orderItemFactory;
}
示例9: __construct
/**
* @param \Magento\Framework\Model\Context $context
* @param \Magento\Framework\Registry $registry
* @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate
* @param \Magento\Framework\Stdlib\DateTime $dateTime
* @param Creditmemo\Config $creditmemoConfig
* @param \Magento\Sales\Model\OrderFactory $orderFactory
* @param \Magento\Sales\Model\Resource\Order\Creditmemo\Item\CollectionFactory $cmItemCollectionFactory
* @param \Magento\Framework\Math\CalculatorFactory $calculatorFactory
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
* @param Creditmemo\CommentFactory $commentFactory
* @param \Magento\Sales\Model\Resource\Order\Creditmemo\Comment\CollectionFactory $commentCollectionFactory
* @param \Magento\Framework\Model\Resource\AbstractResource $resource
* @param \Magento\Framework\Data\Collection\Db $resourceCollection
* @param array $data
*/
public function __construct(\Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate, \Magento\Framework\Stdlib\DateTime $dateTime, \Magento\Sales\Model\Order\Creditmemo\Config $creditmemoConfig, \Magento\Sales\Model\OrderFactory $orderFactory, \Magento\Sales\Model\Resource\Order\Creditmemo\Item\CollectionFactory $cmItemCollectionFactory, \Magento\Framework\Math\CalculatorFactory $calculatorFactory, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Sales\Model\Order\Creditmemo\CommentFactory $commentFactory, \Magento\Sales\Model\Resource\Order\Creditmemo\Comment\CollectionFactory $commentCollectionFactory, \Magento\Framework\Model\Resource\AbstractResource $resource = null, \Magento\Framework\Data\Collection\Db $resourceCollection = null, array $data = array())
{
$this->_creditmemoConfig = $creditmemoConfig;
$this->_orderFactory = $orderFactory;
$this->_cmItemCollectionFactory = $cmItemCollectionFactory;
$this->_calculatorFactory = $calculatorFactory;
$this->_storeManager = $storeManager;
$this->_commentFactory = $commentFactory;
$this->_commentCollectionFactory = $commentCollectionFactory;
parent::__construct($context, $registry, $localeDate, $dateTime, $resource, $resourceCollection, $data);
}
示例10: __construct
/**
* @param \Magento\Framework\Model\Context $context
* @param \Magento\Framework\Registry $registry
* @param \Magento\Framework\Api\ExtensionAttributesFactory $extensionFactory
* @param \Magento\Framework\Api\AttributeValueFactory $customAttributeFactory,
* @param \Magento\Payment\Helper\Data $paymentData
* @param \Magento\Framework\Encryption\EncryptorInterface $encryptor
* @param \Magento\Framework\Model\ResourceModel\AbstractResource $resource
* @param \Magento\Framework\Data\Collection\AbstractDb $resourceCollection
* @param array $data
*/
public function __construct(\Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Framework\Api\ExtensionAttributesFactory $extensionFactory, \Magento\Framework\Api\AttributeValueFactory $customAttributeFactory, \Magento\Payment\Helper\Data $paymentData, \Magento\Framework\Encryption\EncryptorInterface $encryptor, \Magento\Framework\Model\ResourceModel\AbstractResource $resource = null, \Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null, array $data = [])
{
$this->paymentData = $paymentData;
$this->encryptor = $encryptor;
parent::__construct($context, $registry, $extensionFactory, $customAttributeFactory, $resource, $resourceCollection, $data);
}
示例11: __construct
/**
* @param \Magento\Framework\Model\Context $context
* @param \Magento\Framework\Registry $registry
* @param \Magento\Framework\Api\ExtensionAttributesFactory $extensionFactory
* @param AttributeValueFactory $customAttributeFactory
* @param \Magento\Sales\Model\ResourceModel\Order\Shipment\Item\CollectionFactory $shipmentItemCollectionFactory
* @param \Magento\Sales\Model\ResourceModel\Order\Shipment\Track\CollectionFactory $trackCollectionFactory
* @param Shipment\CommentFactory $commentFactory
* @param \Magento\Sales\Model\ResourceModel\Order\Shipment\Comment\CollectionFactory $commentCollectionFactory
* @param \Magento\Sales\Api\OrderRepositoryInterface $orderRepository
* @param \Magento\Framework\Model\ResourceModel\AbstractResource $resource
* @param \Magento\Framework\Data\Collection\AbstractDb $resourceCollection
* @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\Sales\Model\ResourceModel\Order\Shipment\Item\CollectionFactory $shipmentItemCollectionFactory, \Magento\Sales\Model\ResourceModel\Order\Shipment\Track\CollectionFactory $trackCollectionFactory, \Magento\Sales\Model\Order\Shipment\CommentFactory $commentFactory, \Magento\Sales\Model\ResourceModel\Order\Shipment\Comment\CollectionFactory $commentCollectionFactory, \Magento\Sales\Api\OrderRepositoryInterface $orderRepository, \Magento\Framework\Model\ResourceModel\AbstractResource $resource = null, \Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null, array $data = [])
{
$this->_shipmentItemCollectionFactory = $shipmentItemCollectionFactory;
$this->_trackCollectionFactory = $trackCollectionFactory;
$this->_commentFactory = $commentFactory;
$this->_commentCollectionFactory = $commentCollectionFactory;
$this->orderRepository = $orderRepository;
parent::__construct($context, $registry, $extensionFactory, $customAttributeFactory, $resource, $resourceCollection, $data);
}
示例12: __construct
/**
* Initialize dependencies.
*
* @param \Magento\Framework\Model\Context $context
* @param \Magento\Framework\Registry $registry
* @param \Magento\Framework\Api\ExtensionAttributesFactory $extensionFactory
* @param AttributeValueFactory $customAttributeFactory
* @param \Magento\Sales\Model\OrderFactory $orderFactory
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
* @param \Magento\Catalog\Api\ProductRepositoryInterface $productRepository
* @param \Magento\Framework\Model\Resource\AbstractResource $resource
* @param \Magento\Framework\Data\Collection\Db $resourceCollection
* @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\Sales\Model\OrderFactory $orderFactory, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Catalog\Api\ProductRepositoryInterface $productRepository, \Magento\Framework\Model\Resource\AbstractResource $resource = null, \Magento\Framework\Data\Collection\Db $resourceCollection = null, array $data = [])
{
parent::__construct($context, $registry, $extensionFactory, $customAttributeFactory, $resource, $resourceCollection, $data);
$this->_orderFactory = $orderFactory;
$this->_storeManager = $storeManager;
$this->productRepository = $productRepository;
}
示例13: __construct
/**
* @param \Magento\Framework\Model\Context $context
* @param \Magento\Framework\Registry $registry
* @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate
* @param \Magento\Framework\Stdlib\DateTime $dateTime
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
* @param \Magento\Framework\Model\Resource\AbstractResource $resource
* @param \Magento\Framework\Data\Collection\Db $resourceCollection
* @param array $data
*/
public function __construct(\Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate, \Magento\Framework\Stdlib\DateTime $dateTime, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Framework\Model\Resource\AbstractResource $resource = null, \Magento\Framework\Data\Collection\Db $resourceCollection = null, array $data = array())
{
parent::__construct($context, $registry, $localeDate, $dateTime, $resource, $resourceCollection, $data);
$this->_storeManager = $storeManager;
}
示例14: __construct
/**
* @param \Magento\Framework\Model\Context $context
* @param \Magento\Framework\Registry $registry
* @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate
* @param \Magento\Framework\Stdlib\DateTime $dateTime
* @param \Magento\Payment\Helper\Data $paymentData
* @param \Magento\Sales\Helper\Data $salesData
* @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
* @param \Magento\Sales\Model\OrderFactory $orderFactory
* @param \Magento\Sales\Model\Resource\Order\Shipment\Item\CollectionFactory $shipmentItemCollectionFactory
* @param \Magento\Sales\Model\Resource\Order\Shipment\Track\CollectionFactory $trackCollectionFactory
* @param Shipment\CommentFactory $commentFactory
* @param \Magento\Sales\Model\Resource\Order\Shipment\Comment\CollectionFactory $commentCollectionFactory
* @param \Magento\Framework\Mail\Template\TransportBuilder $transportBuilder
* @param \Magento\Framework\Model\Resource\AbstractResource $resource
* @param \Magento\Framework\Data\Collection\Db $resourceCollection
* @param array $data
*/
public function __construct(\Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate, \Magento\Framework\Stdlib\DateTime $dateTime, \Magento\Payment\Helper\Data $paymentData, \Magento\Sales\Helper\Data $salesData, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Sales\Model\OrderFactory $orderFactory, \Magento\Sales\Model\Resource\Order\Shipment\Item\CollectionFactory $shipmentItemCollectionFactory, \Magento\Sales\Model\Resource\Order\Shipment\Track\CollectionFactory $trackCollectionFactory, \Magento\Sales\Model\Order\Shipment\CommentFactory $commentFactory, \Magento\Sales\Model\Resource\Order\Shipment\Comment\CollectionFactory $commentCollectionFactory, \Magento\Framework\Mail\Template\TransportBuilder $transportBuilder, \Magento\Framework\Model\Resource\AbstractResource $resource = null, \Magento\Framework\Data\Collection\Db $resourceCollection = null, array $data = array())
{
$this->_paymentData = $paymentData;
$this->_salesData = $salesData;
$this->_scopeConfig = $scopeConfig;
$this->_orderFactory = $orderFactory;
$this->_shipmentItemCollectionFactory = $shipmentItemCollectionFactory;
$this->_trackCollectionFactory = $trackCollectionFactory;
$this->_commentFactory = $commentFactory;
$this->_commentCollectionFactory = $commentCollectionFactory;
$this->_transportBuilder = $transportBuilder;
parent::__construct($context, $registry, $localeDate, $dateTime, $resource, $resourceCollection, $data);
}
示例15: __construct
/**
* @param \Magento\Framework\Model\Context $context
* @param \Magento\Framework\Registry $registry
* @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate
* @param \Magento\Framework\Stdlib\DateTime $dateTime
* @param \Magento\Sales\Model\OrderFactory $orderFactory
* @param \Magento\Sales\Model\Resource\Order\Shipment\Item\CollectionFactory $shipmentItemCollectionFactory
* @param \Magento\Sales\Model\Resource\Order\Shipment\Track\CollectionFactory $trackCollectionFactory
* @param Shipment\CommentFactory $commentFactory
* @param \Magento\Sales\Model\Resource\Order\Shipment\Comment\CollectionFactory $commentCollectionFactory
* @param \Magento\Framework\Model\Resource\AbstractResource $resource
* @param \Magento\Framework\Data\Collection\Db $resourceCollection
* @param array $data
*/
public function __construct(\Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate, \Magento\Framework\Stdlib\DateTime $dateTime, \Magento\Sales\Model\OrderFactory $orderFactory, \Magento\Sales\Model\Resource\Order\Shipment\Item\CollectionFactory $shipmentItemCollectionFactory, \Magento\Sales\Model\Resource\Order\Shipment\Track\CollectionFactory $trackCollectionFactory, \Magento\Sales\Model\Order\Shipment\CommentFactory $commentFactory, \Magento\Sales\Model\Resource\Order\Shipment\Comment\CollectionFactory $commentCollectionFactory, \Magento\Framework\Model\Resource\AbstractResource $resource = null, \Magento\Framework\Data\Collection\Db $resourceCollection = null, array $data = array())
{
$this->_orderFactory = $orderFactory;
$this->_shipmentItemCollectionFactory = $shipmentItemCollectionFactory;
$this->_trackCollectionFactory = $trackCollectionFactory;
$this->_commentFactory = $commentFactory;
$this->_commentCollectionFactory = $commentCollectionFactory;
parent::__construct($context, $registry, $localeDate, $dateTime, $resource, $resourceCollection, $data);
}