/** * @return bool * @throws \Ess\M2ePro\Model\Exception\Logic */ public function isLocked() { if (parent::isLocked()) { return true; } return (bool) $this->activeRecordFactory->getObject('Amazon\\Listing\\Product')->getCollection()->addFieldToFilter('template_shipping_override_id', $this->getId())->getSize(); }
/** * @return bool * @throws \Ess\M2ePro\Model\Exception\Logic */ public function isLocked() { if (parent::isLocked()) { return true; } return (bool) $this->activeRecordFactory->getObject('Ebay\\Listing')->getCollection()->addFieldToFilter('template_shipping_mode', \Ess\M2ePro\Model\Ebay\Template\Manager::MODE_TEMPLATE)->addFieldToFilter('template_shipping_id', $this->getId())->getSize() || (bool) $this->activeRecordFactory->getObject('Ebay\\Listing\\Product')->getCollection()->addFieldToFilter('template_shipping_mode', \Ess\M2ePro\Model\Ebay\Template\Manager::MODE_TEMPLATE)->addFieldToFilter('template_shipping_id', $this->getId())->getSize(); }
public function isLocked() { if (is_null($this->getId())) { throw new \Ess\M2ePro\Model\Exception\Logic('Method require loaded instance first'); } if (parent::isLocked()) { return true; } $childObject = $this->getChildObject(); if (is_null($childObject)) { return false; } if ($childObject->isLocked()) { return true; } return false; }