/** * Enter description here... * * @return bool */ public function delete() { if (count($this->getPresentsList()) > 0) { throw new RM_Base_Exception_BadUsage(__METHOD__ . ': you want delete not empty category'); } return parent::delete(); }
public function delete() { if ($this->_mapper->canDeleteTradeCenter($this)) { parent::delete(); } else { throw new Exception("Unable to delete tradeCenter " . $this->name . " due shops linked to it."); } }
public function delete() { if (!$this->canDelete()) { $res = M('Base')->result(); $res->error('family_is_not_empty'); throw new RM_Validator_Exception($res); } parent::delete(); }
public function delete() { if ($this->_mapper->shopTypeDeleteCheck($this)) { $this->_mapper->deleteSettings('type', $this->id()); parent::delete(); } else { throw new Exception("Unable to delete shop type `" . $this->name . "' due shops linked to it."); } }
public function delete() { if (!$this->_mapper->canDeleteCatalogueEntry($this)) { $res = M('Base')->result(); $res->error('have_childs'); throw new RM_Validator_Exception($res); } parent::delete(); }
public function delete() { if (($this->city_id != me()->city_id || !$this->city_id) && !me()->isUserInGroup('federal-news')) { $this->_permissionDenied(); } if ($this->city_id == me()->city_id && !me()->isUserInGroup('regional-news')) { $this->_permissionDenied(); } parent::delete(); }
/** * Delete mail & all related objects. * * @return bool true - success * false - failed (use $ob->validator()->getErrors() method to get errors) */ public function delete() { $rs = $this->getAttachmentList(); if (!parent::delete()) { return false; } foreach ($rs as $ob) { $ob->delete(); } return true; }
/** * @see RM_Store_Object::delete */ public function delete() { if (count($this->_mapper->getCompositeListForScript($this)) > 0) { throw new RM_Validator_Exception(M('Base')->error('has_depended_composite')); } parent::delete(); if (!isNull($this->_map)) { $this->_mapper->deleteMap($this); } return TRUE; }
public function delete() { if ($this->_mapper->hasDependency($this)) { return FALSE; } foreach ($this->_mapper->getDependedList($this)->sort('cdate', 'desc')->sort('pos') as $object) { $this->_mapper->removeDependency($this, $object); $object->delete(); } $this->_mapper->clearStack($this->id()); parent::delete(); return TRUE; }
/** * Deletes leave (удалить отпуск). * * @return bool */ public function delete() { /* if ( !$this->canDelete() ) return FALSE;*/ $this->_mapper->resetDaysByLeave($this); return parent::delete(); }
/** * Deletes this object * * @return bool **/ public function delete() { // нельзя удалить, если объект в стоплисте if ($this->stoplist == 1) { return FALSE; } // нельзя удалить, если привязаны штрих-коды // You cannot delete object because there are barcodes linked with this entity if (count($this->getBarcodes()) > 0) { $res = new RM_Base_Result(); $res->error('has_barcode'); throw new RM_Validator_Exception($res); } return parent::delete(); }
/** * Delete type & all related objects. * * @return bool true - success * false - failed (use $ob->validator()->getErrors() method to get errors) */ public function delete() { $rs1 = $this->getTemplateList(); $rs2 = $this->getVariableList(); if (!parent::delete()) { return false; } // delete templates foreach ($rs1 as $ob) { $ob->delete(); } // delete variables foreach ($rs2 as $ob) { $ob->delete(); } return true; }
public function delete() { if ($this->_mapper->hasActiveLinks($this) && trim($this->name) != 'Введите название') { $result = M('Base')->result(); $result->error('has_active_links'); throw new RM_Validator_Exception($result); } foreach ($this->receipts() as $obReceipt) { $obReceipt->delete(); } $this->_mapper->removeAssortiment($this); $this->_mapper->removeLinks($this); return parent::delete(); }
/** * Deletes this object * * @return bool **/ public function delete() { if (parent::delete()) { $this->clearResultSteps(); return TRUE; } return FALSE; }
public function undo() { return parent::delete(); }
public function delete() { $this->getRootDir()->delete(); parent::delete(); }
/** * Deletes this object * * @return bool **/ public function delete() { $this->clearResultAnswers(); return parent::delete(); }
/** * Deletes this object * * @return bool **/ public function delete() { $this->_canDelete(); return parent::delete(); }
/** * Enter description here... * * @return void */ public function delete() { if (!$this->canDelete()) { throw new RM_Base_Exception_BadUsage(__METHOD__ . ' you can\'t delete this order. Please use `canDelete()` method to check '); } M('Points')->deletePresentOrder(array('user_id' => $this->user_id, 'present_id' => $this->present_id, 'price' => $this->getPresent()->price, 'quantity' => $this->quantity)); foreach ($this->_items as $obOrderItem) { $obOrderItem->delete(); } return parent::delete(); }