本文整理汇总了PHP中Magento\Framework\DataObject::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP DataObject::__construct方法的具体用法?PHP DataObject::__construct怎么用?PHP DataObject::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Magento\Framework\DataObject
的用法示例。
在下文中一共展示了DataObject::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* @param Factory $factoryElement
* @param CollectionFactory $factoryCollection
* @param array $data
*/
public function __construct(Factory $factoryElement, CollectionFactory $factoryCollection, $data = [])
{
$this->_factoryElement = $factoryElement;
$this->_factoryCollection = $factoryCollection;
parent::__construct($data);
$this->_construct();
}
示例2: __construct
/**
* @param \Magento\Framework\Locale\Resolver $localeResolver
* @param \Magento\Customer\Helper\Address $customerAddress
* @param \Magento\Tax\Helper\Data $taxData
* @param array $data
*/
public function __construct(Resolver $localeResolver, Address $customerAddress, Data $taxData, array $data = [])
{
$this->customerAddress = $customerAddress;
$this->localeResolver = $localeResolver;
$this->taxData = $taxData;
parent::__construct($data);
}
示例3: __construct
/**
* @param \Magento\Framework\Locale\Resolver $localeResolver
* @param \Magento\Customer\Helper\Address $customerAddress
* @param \Magento\Tax\Helper\Data $taxData
* @param array $data
*/
public function __construct(\Magento\Framework\Locale\Resolver $localeResolver, \Magento\Customer\Helper\Address $customerAddress, \Magento\Tax\Helper\Data $taxData, array $data = [])
{
$this->_customerAddress = $customerAddress;
$this->localeResolver = $localeResolver;
$this->_taxData = $taxData;
parent::__construct($data);
}
示例4: __construct
/**
* @param \Magento\Framework\Registry $coreRegistry
* @param \Magento\Email\Model\ResourceModel\Template\CollectionFactory $templatesFactory
* @param \Magento\Email\Model\Template\Config $emailConfig
* @param array $data
*/
public function __construct(\Magento\Framework\Registry $coreRegistry, \Magento\Email\Model\ResourceModel\Template\CollectionFactory $templatesFactory, \Magento\Email\Model\Template\Config $emailConfig, array $data = [])
{
parent::__construct($data);
$this->_coreRegistry = $coreRegistry;
$this->_templatesFactory = $templatesFactory;
$this->_emailConfig = $emailConfig;
}
示例5: __construct
/**
* Initialize dependencies
*
* @param \Magento\Tax\Helper\Data $taxHelper
* @param \Magento\Tax\Model\Calculation $taxCalculation
* @param \Magento\Tax\Model\ResourceModel\Sales\Order\Tax\CollectionFactory $ordersFactory
* @param array $data
*/
public function __construct(\Magento\Tax\Helper\Data $taxHelper, \Magento\Tax\Model\Calculation $taxCalculation, \Magento\Tax\Model\ResourceModel\Sales\Order\Tax\CollectionFactory $ordersFactory, array $data = [])
{
$this->_taxHelper = $taxHelper;
$this->_taxCalculation = $taxCalculation;
$this->_taxOrdersFactory = $ordersFactory;
parent::__construct($data);
}
示例6: __construct
/**
* Constructor
*
* @param ObjectManagerInterface $objectManager
* @param ManagerInterface $componentManager
* @param InterpreterInterface $argumentInterpreter
* @param ContextFactory $contextFactory
* @param array $data
*/
public function __construct(ObjectManagerInterface $objectManager, ManagerInterface $componentManager, InterpreterInterface $argumentInterpreter, ContextFactory $contextFactory, array $data = [])
{
$this->objectManager = $objectManager;
$this->componentManager = $componentManager;
$this->argumentInterpreter = $argumentInterpreter;
$this->contextFactory = $contextFactory;
parent::__construct($data);
}
示例7: __construct
/**
* @param ConfigInterface $config
* @param ActionFactory $actionFactory
* @param View\StateInterface $state
* @param View\ChangelogInterface $changelog
* @param View\SubscriptionFactory $subscriptionFactory
* @param array $data
*/
public function __construct(ConfigInterface $config, ActionFactory $actionFactory, View\StateInterface $state, View\ChangelogInterface $changelog, View\SubscriptionFactory $subscriptionFactory, array $data = [])
{
$this->config = $config;
$this->actionFactory = $actionFactory;
$this->state = $state;
$this->changelog = $changelog;
$this->subscriptionFactory = $subscriptionFactory;
parent::__construct($data);
}
示例8: __construct
/**
* @param \Magento\Framework\UrlFactory $urlFactory
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
* @param \Magento\Framework\Filter\FilterManager $filter
* @param \Magento\Framework\Session\SidResolverInterface $sidResolver
* @param UrlFinderInterface $urlFinder
* @param array $data
*/
public function __construct(\Magento\Framework\UrlFactory $urlFactory, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Framework\Filter\FilterManager $filter, \Magento\Framework\Session\SidResolverInterface $sidResolver, UrlFinderInterface $urlFinder, array $data = [])
{
parent::__construct($data);
$this->urlFactory = $urlFactory;
$this->storeManager = $storeManager;
$this->filter = $filter;
$this->sidResolver = $sidResolver;
$this->urlFinder = $urlFinder;
}
示例9: __construct
public function __construct(\Arkade\S3\Helper\Data $helper, \Magento\MediaStorage\Helper\File\Media $mediaHelper, \Magento\MediaStorage\Helper\File\Storage\Database $storageHelper, \Psr\Log\LoggerInterface $logger)
{
parent::__construct();
$this->helper = $helper;
$this->mediaHelper = $mediaHelper;
$this->storageHelper = $storageHelper;
$this->logger = $logger;
$this->client = new \Aws\S3\S3Client(['version' => 'latest', 'region' => $this->helper->getRegion(), 'credentials' => ['key' => $this->helper->getAccessKey(), 'secret' => $this->helper->getSecretKey()]]);
}
示例10: __construct
/**
* @param \Magento\Shipping\Helper\Data $shippingData
* @param \Magento\Sales\Model\OrderFactory $orderFactory
* @param \Magento\Sales\Api\ShipmentRepositoryInterface $shipmentRepository
* @param \Magento\Shipping\Model\Order\TrackFactory $trackFactory
* @param \Magento\Shipping\Model\ResourceModel\Order\Track\CollectionFactory $trackCollectionFactory
* @param array $data
*/
public function __construct(\Magento\Shipping\Helper\Data $shippingData, \Magento\Sales\Model\OrderFactory $orderFactory, \Magento\Sales\Api\ShipmentRepositoryInterface $shipmentRepository, \Magento\Shipping\Model\Order\TrackFactory $trackFactory, \Magento\Shipping\Model\ResourceModel\Order\Track\CollectionFactory $trackCollectionFactory, array $data = [])
{
$this->_shippingData = $shippingData;
$this->_orderFactory = $orderFactory;
$this->shipmentRepository = $shipmentRepository;
$this->_trackFactory = $trackFactory;
$this->_trackCollectionFactory = $trackCollectionFactory;
parent::__construct($data);
}
示例11: __construct
/**
* Constructor
*
* @param \Magento\Catalog\Model\Product\Compare\ItemFactory $compareItemFactory
* @param \Magento\Catalog\Model\ResourceModel\Product\Compare\Item\CollectionFactory $itemCollectionFactory
* @param \Magento\Catalog\Model\ResourceModel\Product\Compare\Item $catalogProductCompareItem
* @param \Magento\Customer\Model\Session $customerSession
* @param \Magento\Customer\Model\Visitor $customerVisitor
* @param array $data
*/
public function __construct(\Magento\Catalog\Model\Product\Compare\ItemFactory $compareItemFactory, \Magento\Catalog\Model\ResourceModel\Product\Compare\Item\CollectionFactory $itemCollectionFactory, \Magento\Catalog\Model\ResourceModel\Product\Compare\Item $catalogProductCompareItem, \Magento\Customer\Model\Session $customerSession, \Magento\Customer\Model\Visitor $customerVisitor, array $data = [])
{
$this->_compareItemFactory = $compareItemFactory;
$this->_itemCollectionFactory = $itemCollectionFactory;
$this->_catalogProductCompareItem = $catalogProductCompareItem;
$this->_customerSession = $customerSession;
$this->_customerVisitor = $customerVisitor;
parent::__construct($data);
}
示例12: __construct
/**
* @param \Magento\Framework\Message\ManagerInterface $messageManager
* @param \Magento\Framework\Registry $registry
* @param \Magento\Sales\Model\Order\ShipmentRepository $shipmentRepository
* @param \Magento\Sales\Model\Order\ShipmentFactory $shipmentFactory
* @param \Magento\Sales\Model\Order\Shipment\TrackFactory $trackFactory
* @param \Magento\Sales\Api\OrderRepositoryInterface $orderRepository
* @param array $data
*/
public function __construct(\Magento\Framework\Message\ManagerInterface $messageManager, \Magento\Framework\Registry $registry, \Magento\Sales\Model\Order\ShipmentRepository $shipmentRepository, \Magento\Sales\Model\Order\ShipmentFactory $shipmentFactory, \Magento\Sales\Model\Order\Shipment\TrackFactory $trackFactory, \Magento\Sales\Api\OrderRepositoryInterface $orderRepository, array $data = [])
{
$this->messageManager = $messageManager;
$this->registry = $registry;
$this->shipmentRepository = $shipmentRepository;
$this->shipmentFactory = $shipmentFactory;
$this->trackFactory = $trackFactory;
$this->orderRepository = $orderRepository;
parent::__construct($data);
}
示例13: __construct
/**
* @param \Magento\Backup\Helper\Data $helper
* @param \Magento\Framework\Locale\ResolverInterface $localeResolver
* @param \Magento\Backend\Model\Auth\Session $authSession
* @param \Magento\Framework\Encryption\EncryptorInterface $encryptor
* @param \Magento\Framework\Filesystem $filesystem
* @param array $data
*/
public function __construct(\Magento\Backup\Helper\Data $helper, \Magento\Framework\Locale\ResolverInterface $localeResolver, \Magento\Backend\Model\Auth\Session $authSession, \Magento\Framework\Encryption\EncryptorInterface $encryptor, \Magento\Framework\Filesystem $filesystem, $data = [])
{
$this->_encryptor = $encryptor;
parent::__construct($data);
$this->_filesystem = $filesystem;
$this->varDirectory = $this->_filesystem->getDirectoryWrite(DirectoryList::VAR_DIR);
$this->_helper = $helper;
$this->_localeResolver = $localeResolver;
$this->_backendAuthSession = $authSession;
}
示例14: __construct
/**
* @param ConfigInterface $config
* @param ActionFactory $actionFactory
* @param StructureFactory $structureFactory
* @param \Magento\Framework\Mview\ViewInterface $view
* @param Indexer\StateFactory $stateFactory
* @param Indexer\CollectionFactory $indexersFactory
* @param array $data
*/
public function __construct(ConfigInterface $config, ActionFactory $actionFactory, StructureFactory $structureFactory, \Magento\Framework\Mview\ViewInterface $view, Indexer\StateFactory $stateFactory, Indexer\CollectionFactory $indexersFactory, array $data = [])
{
$this->config = $config;
$this->actionFactory = $actionFactory;
$this->structureFactory = $structureFactory;
$this->view = $view;
$this->stateFactory = $stateFactory;
$this->indexersFactory = $indexersFactory;
parent::__construct($data);
}
示例15: __construct
/**
* @param \Magento\Checkout\Model\Session $checkoutSession
* @param \Magento\Catalog\Model\ResourceModel\Url $catalogUrl
* @param \Magento\Checkout\Model\Cart $checkoutCart
* @param \Magento\Checkout\Helper\Data $checkoutHelper
* @param ItemPoolInterface $itemPoolInterface
* @param \Magento\Framework\View\LayoutInterface $layout
* @param array $data
* @codeCoverageIgnore
*/
public function __construct(\Magento\Checkout\Model\Session $checkoutSession, \Magento\Catalog\Model\ResourceModel\Url $catalogUrl, \Magento\Checkout\Model\Cart $checkoutCart, \Magento\Checkout\Helper\Data $checkoutHelper, ItemPoolInterface $itemPoolInterface, \Magento\Framework\View\LayoutInterface $layout, array $data = [])
{
parent::__construct($data);
$this->checkoutSession = $checkoutSession;
$this->catalogUrl = $catalogUrl;
$this->checkoutCart = $checkoutCart;
$this->checkoutHelper = $checkoutHelper;
$this->itemPoolInterface = $itemPoolInterface;
$this->layout = $layout;
}