From 149b04654af3ff70a61358efd1dda7b1d29afd0c Mon Sep 17 00:00:00 2001 From: paolo Date: Wed, 15 Jun 2016 11:30:22 +0200 Subject: [PATCH] Added the method getOnlyKontaktByPersonID to controller Kontakt --- .../controllers/api/v1/person/Kontakt.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/application/controllers/api/v1/person/Kontakt.php b/application/controllers/api/v1/person/Kontakt.php index 799061ce4..180acadb5 100644 --- a/application/controllers/api/v1/person/Kontakt.php +++ b/application/controllers/api/v1/person/Kontakt.php @@ -93,6 +93,22 @@ class Kontakt extends APIv1_Controller } } + public function getOnlyKontaktByPersonID() + { + $person_id = $this->get("person_id"); + + if (isset($person_id)) + { + $result = $this->KontaktModel->loadWhere(array('person_id' => $person_id)); + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + public function getKontaktByPersonIDKontaktTyp() { $person_id = $this->get("person_id");