public function eventBeforeExecuting() { parent::eventBeforeExecuting(); $changeIds = array(); foreach ($this->params['items'] as $orderRefund) { if (!is_array($orderRefund)) { continue; } $changeIds[] = $orderRefund['change_id']; } $this->activeRecordFactory->getObject('Order\\Change')->getResource()->deleteByIds($changeIds); }
function __construct(\Ess\M2ePro\Model\ActiveRecord\Component\Parent\Amazon\Factory $amazonFactory, \Ess\M2ePro\Helper\Factory $helperFactory, \Ess\M2ePro\Model\Factory $modelFactory, \Ess\M2ePro\Model\Account $account, array $params) { $this->amazonFactory = $amazonFactory; parent::__construct($helperFactory, $modelFactory, $account, $params); }
protected function getProcessingParams() { return array_merge(parent::getProcessingParams(), array('request_data' => $this->getRequestData(), 'listing_product_ids' => array_keys($this->listingsProducts), 'lock_identifier' => $this->getLockIdentifier(), 'action_type' => $this->getActionType())); }