function __construct(\Ess\M2ePro\Model\ActiveRecord\Component\Parent\Ebay\Factory $ebayFactory, \Ess\M2ePro\Model\Connector\Connection\Response $response, \Ess\M2ePro\Helper\Factory $helperFactory, \Ess\M2ePro\Model\Factory $modelFactory, \Ess\M2ePro\Model\ActiveRecord\Factory $activeRecordFactory, array $params = array()) { parent::__construct($ebayFactory, $response, $helperFactory, $modelFactory, $params); $this->activeRecordFactory = $activeRecordFactory; $listingProductId = $this->params['product']['id']; $this->listingProduct = $this->ebayFactory->getObjectLoaded('Listing\\Product', $listingProductId); }
function __construct(\Ess\M2ePro\Model\ActiveRecord\Component\Parent\Ebay\Factory $ebayFactory, \Ess\M2ePro\Model\Connector\Connection\Response $response, \Ess\M2ePro\Helper\Factory $helperFactory, \Ess\M2ePro\Model\Factory $modelFactory, array $params = array()) { parent::__construct($ebayFactory, $response, $helperFactory, $modelFactory, $params); $listingsProductsIds = array_keys($this->params['products']); /** @var \Ess\M2ePro\Model\ResourceModel\Listing\Product\Collection $listingProductCollection */ $listingProductCollection = $this->ebayFactory->getObject('Listing\\Product')->getCollection(); $listingProductCollection->addFieldToFilter('id', array('in' => $listingsProductsIds)); $this->listingsProducts = $listingProductCollection->getItems(); }