/** * @param null|TblCommodityItem $serviceBilling_CommodityItem */ public function setServiceBillingCommodityItem($serviceBilling_CommodityItem = null) { $this->serviceBilling_CommodityItem = null === $serviceBilling_CommodityItem ? null : $serviceBilling_CommodityItem->getId(); }
/** * @param TblCommodityItem $tblCommodityItem * * @return bool */ public function actionRemoveCommodityItem(TblCommodityItem $tblCommodityItem) { $Manager = $this->Connection->getEntityManager(); $Entity = $Manager->getEntity('TblCommodityItem')->findOneBy(array('Id' => $tblCommodityItem->getId())); if (null !== $Entity) { /** @var Element $Entity */ Protocol::useService()->createDeleteEntry($this->Connection->getDatabase(), $Entity); $Manager->killEntity($Entity); return true; } return false; }