mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 00:12:15 +00:00
Added functionalities for deleting a Prestudent and a PrestudentStatus
This commit is contained in:
@@ -90,6 +90,23 @@ class Prestudent extends APIv1_Controller
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function deletePrestudent()
|
||||
{
|
||||
if ($this->_validate($this->delete()))
|
||||
{
|
||||
$result = $this->PrestudentModel->delete($this->delete()["prestudent_id"]);
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
@@ -152,4 +169,4 @@ class Prestudent extends APIv1_Controller
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,8 +104,33 @@ class Prestudentstatus extends APIv1_Controller
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function deletePrestudentstatus()
|
||||
{
|
||||
$prestudentstatus = $this->_parseData($this->delete());
|
||||
|
||||
if ($this->_validate($prestudentstatus))
|
||||
{
|
||||
$pksArray = array($prestudentstatus['ausbildungssemester'],
|
||||
$prestudentstatus['studiensemester_kurzbz'],
|
||||
$prestudentstatus['status_kurzbz'],
|
||||
$prestudentstatus['prestudent_id']
|
||||
);
|
||||
|
||||
$result = $this->PrestudentstatusModel->delete($pksArray);
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
private function _validate($prestudentstatus = null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user