Exemplo n.º 1
0
 /**
  * @param string $pmt_uid {@min 1} {@max 32}
  * @param string $key1 {@min 1}
  * @param string $value1 {@min 1}
  * @param string $key2
  * @param string $value2
  * @param string $key3
  * @param string $value3
  *
  * @return array
  *
  * @author Brayan Pereyra (Cochalo) <*****@*****.**>
  * @copyright Colosa - Bolivia
  *
  * @url DELETE /:pmt_uid/data/:key1/:value1
  * @url DELETE /:pmt_uid/data/:key1/:value1/:key2/:value2
  * @url DELETE /:pmt_uid/data/:key1/:value1/:key2/:value2/:key3/:value3
  */
 public function doDeletePmTableData($pmt_uid, $key1, $value1, $key2 = '', $value2 = '', $key3 = '', $value3 = '')
 {
     try {
         $rows = array($key1 => $value1);
         if ($key2 != '') {
             $rows[$key2] = $value2;
         }
         if ($key3 != '') {
             $rows[$key3] = $value3;
         }
         $oReportTable = new \ProcessMaker\BusinessModel\Table();
         $response = $oReportTable->deleteTableData($pmt_uid, $rows);
         return $response;
     } catch (\Exception $e) {
         throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
     }
 }
Exemplo n.º 2
0
 /**
  * @param string $prj_uid {@min 1} {@max 32}
  * @param string $rep_uid {@min 1} {@max 32}
  * @return void
  *
  * @author Brayan Pereyra (Cochalo) <*****@*****.**>
  * @copyright Colosa - Bolivia
  *
  * @url DELETE /:prj_uid/report-table/:rep_uid
  */
 public function doDeleteReportTable($prj_uid, $rep_uid)
 {
     try {
         $oReportTable = new \ProcessMaker\BusinessModel\Table();
         $response = $oReportTable->deleteTable($rep_uid, $prj_uid, true);
     } catch (\Exception $e) {
         throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
     }
 }