public function delete() { if (!parent::delete()) { return false; } $this->activeRecordFactory->getObject('Ebay\\Processing\\Action\\Item')->getResource()->deleteByAction($this); return true; }
public function delete() { if (!parent::delete()) { return false; } $this->getResource()->deleteResultData($this); return true; }
public function __construct(\Ess\M2ePro\Model\ActiveRecord\Component\Parent\Factory $parentFactory, \Magento\Framework\App\ResourceConnection $resourceConnection, \Ess\M2ePro\Model\Factory $modelFactory, \Ess\M2ePro\Model\ActiveRecord\Factory $activeRecordFactory, \Ess\M2ePro\Helper\Factory $helperFactory, \Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Framework\Model\ResourceModel\AbstractResource $resource = null, \Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null, array $data = []) { $this->parentFactory = $parentFactory; $this->resourceConnection = $resourceConnection; parent::__construct($modelFactory, $activeRecordFactory, $helperFactory, $context, $registry, $resource, $resourceCollection, $data); }
public function delete() { $temp = parent::delete(); $temp && ($this->accountModel = NULL); return $temp; }
public function _construct() { parent::_construct(); $this->_init('Ess\\M2ePro\\Model\\ResourceModel\\Request\\Pending\\Single'); }
public function _construct() { parent::_construct(); $this->_init('Ess\\M2ePro\\Model\\ResourceModel\\Amazon\\Processing\\Action\\Item'); }
public function _construct() { parent::_construct(); $this->_init('Ess\\M2ePro\\Model\\ResourceModel\\Connector\\Command\\Pending\\Requester\\Partial'); }
public function _construct() { parent::_construct(); $this->_init('Ess\\M2ePro\\Model\\ResourceModel\\Order\\Change'); }
public function _construct() { parent::_construct(); $this->_init('Ess\\M2ePro\\Model\\ResourceModel\\Log\\System'); }
public function _construct() { parent::_construct(); $this->_init('Ess\\M2ePro\\Model\\ResourceModel\\Amazon\\Listing\\Product\\Repricing'); }
public function _construct() { parent::_construct(); $this->_init('Ess\\M2ePro\\Model\\ResourceModel\\Ebay\\Order\\ExternalTransaction'); }
protected function _beforeSave() { $serialized = serialize($this->getConditions()->asArray()); $this->setData('conditions_serialized', $serialized); return parent::_beforeSave(); }
public function _construct() { parent::_construct(); $this->_init('Ess\\M2ePro\\Model\\ResourceModel\\OperationHistory'); }
public function _construct() { parent::_construct(); $this->_init('Ess\\M2ePro\\Model\\ResourceModel\\Wizard'); }
/** * @param \Ess\M2ePro\Model\ActiveRecord\AbstractModel $model * @param string $fieldName * @param bool $asObjects * @param array $filters * @param array $sort * @return array|\Ess\M2ePro\Model\ActiveRecord\AbstractModel[] * @throws \Ess\M2ePro\Model\Exception\Logic */ protected function getRelatedItems(\Ess\M2ePro\Model\ActiveRecord\AbstractModel $model, $fieldName, $asObjects = false, array $filters = array(), array $sort = array()) { if (is_null($this->getId())) { throw new \Ess\M2ePro\Model\Exception\Logic('Method require loaded instance first'); } /** @var $tempCollection \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection */ $tempCollection = $model->getCollection(); $tempCollection->addFieldToFilter(new \Zend_Db_Expr("`{$fieldName}`"), $this->getId()); foreach ($filters as $field => $filter) { if ($filter instanceof \Zend_Db_Expr) { $tempCollection->getSelect()->where((string) $filter); continue; } $tempCollection->addFieldToFilter(new \Zend_Db_Expr("`{$field}`"), $filter); } foreach ($sort as $field => $order) { $order = strtoupper(trim($order)); if ($order != \Magento\Framework\Data\Collection::SORT_ORDER_ASC && $order != \Magento\Framework\Data\Collection::SORT_ORDER_DESC) { continue; } $tempCollection->setOrder($field, $order); } if ((bool) $asObjects) { return $tempCollection->getItems(); } $tempArray = $tempCollection->toArray(); return $tempArray['items']; }