Added method PrestudentByPersonID to Prestudent controller

This commit is contained in:
paolo
2016-05-20 14:07:31 +02:00
parent 3e6ac6987e
commit 606bd3d342
@@ -46,6 +46,25 @@ class Prestudent extends APIv1_Controller
$this->response();
}
}
/**
* @return void
*/
public function getPrestudentByPersonID()
{
$person_id = $this->get('person_id');
if (isset($person_id))
{
$result = $this->PrestudentModel->load(array('person_id' => $person_id));
$this->response($result, REST_Controller::HTTP_OK);
}
else
{
$this->response();
}
}
/**
* @return void