示例#1
0
 public function __construct($id = null, $id_lang = null, $id_shop = null)
 {
     parent::__construct($id, $id_lang, $id_shop);
     if ((int) $id > 0) {
         $this->response = LGRespuesta::getResponseByQuestion($id);
     } else {
         $this->response = new LGRespuesta();
     }
 }
示例#2
0
 public function processUpdate()
 {
     $response = LGRespuesta::getResponseByQuestion((int) Tools::getValue('id_consulta'));
     if (!Validate::isLoadedObject($response)) {
         $new_response = true;
     } else {
         $new_response = false;
     }
     $res = $object = parent::processUpdate();
     if ($res) {
         $res = $res->response->update();
         if ($res && $new_response) {
             $res = $this->sendEmailResponseConfirmation($object);
         }
     }
     return $res;
 }