This commit is contained in:
Paula Quispe
2019-09-11 10:28:28 -04:00
parent 235068ff46
commit a60b9b304a
3 changed files with 212 additions and 1 deletions

View File

@@ -16,4 +16,31 @@ require_once 'classes/model/om/BaseProcessFiles.php';
*/
class ProcessFiles extends BaseProcessFiles {
/**
* Remove a process file record
*
* @param string $prfUid
*
* @return string
*
* @throws Exception
**/
public function remove($prfUid)
{
$connection = Propel::getConnection(ProcessFilesPeer::DATABASE_NAME);
try {
$object = ProcessFilesPeer::retrieveByPK($prfUid);
if (!is_null($object)) {
$connection->begin();
$object->delete();
$connection->commit();
} else {
throw new Exception('This row doesn\'t exist!');
}
} catch (Exception $error) {
$connection->rollback();
throw $error;
}
}
} // ProcessFiles