Example #1
0
 /**
  * Remove a news entry
  *
  * @role delete
  * @return JSONResponse
  */
 public function delete()
 {
     try {
         ActiveRecordModel::deleteById('ProductRatingType', $this->request->get('id'));
         return new JSONResponse(false, 'success');
     } catch (Exception $exc) {
         return new JSONResponse(false, 'failure', $this->translate('_could_not_remove_rating_type'));
     }
 }
 /**
  * Delete field group from database
  *
  * @return JSONResponse Status
  */
 public function delete()
 {
     if ($id = $this->request->get("id", false)) {
         ActiveRecordModel::deleteById($this->getClassName(), $id);
         return new JSONResponse(false, 'success');
     } else {
         return new JSONResponse(false, 'failure', $this->translate('_could_not_remove_specfield_group'));
     }
 }
 /**
  * Delete field value from database
  *
  * @return JSONResponse Indicates status
  */
 public function delete()
 {
     if ($id = $this->request->get('id', false)) {
         ActiveRecordModel::deleteById($this->getClassName(), $id);
         return new JSONResponse(false, 'success');
     } else {
         return new JSONResponse(false, 'failure');
     }
 }
Example #4
0
 /**
  * Delete specification field from database
  *
  * @return JSONResponse
  */
 public function delete()
 {
     $id = $this->request->get("id", false);
     if (ActiveRecordModel::objectExists($this->getFieldClass(), $id)) {
         ActiveRecordModel::deleteById($this->getFieldClass(), $id);
         return new JSONResponse(false, 'success');
     } else {
         return new JSONResponse(false, 'failure', $this->translate('_could_not_remove_attribute'));
     }
 }
Example #5
0
 /**
  * Remove a news entry
  *
  * @role delete
  * @return JSONResponse
  */
 public function delete()
 {
     try {
         ActiveRecordModel::deleteById('EyeExamSchedule', $this->request->get('id'));
         return new JSONResponse(false, 'success');
     } catch (Exception $exc) {
         return new JSONResponse(false, 'failure', $this->translate('_could_not_remove_entry'));
     }
 }