mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-25 00:24:35 +00:00
Merge branch 'ci' of https://github.com/FH-Complete/FHC-Core into ci
This commit is contained in:
@@ -0,0 +1,78 @@
|
||||
<?php
|
||||
/**
|
||||
* FH-Complete
|
||||
*
|
||||
* @package FHC-API
|
||||
* @author FHC-Team
|
||||
* @copyright Copyright (c) 2016, fhcomplete.org
|
||||
* @license GPLv3
|
||||
* @link http://fhcomplete.org
|
||||
* @since Version 1.0
|
||||
* @filesource
|
||||
*/
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
if(!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class Bankverbindung extends APIv1_Controller
|
||||
{
|
||||
/**
|
||||
* Bankverbindung API constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
// Load model BankverbindungModel
|
||||
$this->load->model('person/bankverbindung_model', 'BankverbindungModel');
|
||||
// Load set the uid of the model to let to check the permissions
|
||||
$this->BankverbindungModel->setUID($this->_getUID());
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function getBankverbindung()
|
||||
{
|
||||
$bankverbindungID = $this->get('bankverbindung_id');
|
||||
|
||||
if(isset($bankverbindungID))
|
||||
{
|
||||
$result = $this->BankverbindungModel->load($bankverbindungID);
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function postBankverbindung()
|
||||
{
|
||||
if($this->_validate($this->post()))
|
||||
{
|
||||
if(isset($this->post()['bankverbindung_id']))
|
||||
{
|
||||
$result = $this->BankverbindungModel->update($this->post()['bankverbindung_id'], $this->post());
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = $this->BankverbindungModel->insert($this->post());
|
||||
}
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
private function _validate($bankverbindung = NULL)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
<?php
|
||||
/**
|
||||
* FH-Complete
|
||||
*
|
||||
* @package FHC-API
|
||||
* @author FHC-Team
|
||||
* @copyright Copyright (c) 2016, fhcomplete.org
|
||||
* @license GPLv3
|
||||
* @link http://fhcomplete.org
|
||||
* @since Version 1.0
|
||||
* @filesource
|
||||
*/
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
if(!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class Benutzer extends APIv1_Controller
|
||||
{
|
||||
/**
|
||||
* Benutzer API constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
// Load model BenutzerModel
|
||||
$this->load->model('person/benutzer_model', 'BenutzerModel');
|
||||
// Load set the uid of the model to let to check the permissions
|
||||
$this->BenutzerModel->setUID($this->_getUID());
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function getBenutzer()
|
||||
{
|
||||
$benutzerID = $this->get('benutzer_id');
|
||||
|
||||
if(isset($benutzerID))
|
||||
{
|
||||
$result = $this->BenutzerModel->load($benutzerID);
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function postBenutzer()
|
||||
{
|
||||
if($this->_validate($this->post()))
|
||||
{
|
||||
if(isset($this->post()['benutzer_id']))
|
||||
{
|
||||
$result = $this->BenutzerModel->update($this->post()['benutzer_id'], $this->post());
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = $this->BenutzerModel->insert($this->post());
|
||||
}
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
private function _validate($benutzer = NULL)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
<?php
|
||||
/**
|
||||
* FH-Complete
|
||||
*
|
||||
* @package FHC-API
|
||||
* @author FHC-Team
|
||||
* @copyright Copyright (c) 2016, fhcomplete.org
|
||||
* @license GPLv3
|
||||
* @link http://fhcomplete.org
|
||||
* @since Version 1.0
|
||||
* @filesource
|
||||
*/
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
if(!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class Benutzerfunktion extends APIv1_Controller
|
||||
{
|
||||
/**
|
||||
* Benutzerfunktion API constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
// Load model BenutzerfunktionModel
|
||||
$this->load->model('person/benutzerfunktion_model', 'BenutzerfunktionModel');
|
||||
// Load set the uid of the model to let to check the permissions
|
||||
$this->BenutzerfunktionModel->setUID($this->_getUID());
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function getBenutzerfunktion()
|
||||
{
|
||||
$benutzerfunktionID = $this->get('benutzerfunktion_id');
|
||||
|
||||
if(isset($benutzerfunktionID))
|
||||
{
|
||||
$result = $this->BenutzerfunktionModel->load($benutzerfunktionID);
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function postBenutzerfunktion()
|
||||
{
|
||||
if($this->_validate($this->post()))
|
||||
{
|
||||
if(isset($this->post()['benutzerfunktion_id']))
|
||||
{
|
||||
$result = $this->BenutzerfunktionModel->update($this->post()['benutzerfunktion_id'], $this->post());
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = $this->BenutzerfunktionModel->insert($this->post());
|
||||
}
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
private function _validate($benutzerfunktion = NULL)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
<?php
|
||||
/**
|
||||
* FH-Complete
|
||||
*
|
||||
* @package FHC-API
|
||||
* @author FHC-Team
|
||||
* @copyright Copyright (c) 2016, fhcomplete.org
|
||||
* @license GPLv3
|
||||
* @link http://fhcomplete.org
|
||||
* @since Version 1.0
|
||||
* @filesource
|
||||
*/
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
if(!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class Benutzergruppe extends APIv1_Controller
|
||||
{
|
||||
/**
|
||||
* Benutzergruppe API constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
// Load model BenutzergruppeModel
|
||||
$this->load->model('person/benutzergruppe_model', 'BenutzergruppeModel');
|
||||
// Load set the uid of the model to let to check the permissions
|
||||
$this->BenutzergruppeModel->setUID($this->_getUID());
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function getBenutzergruppe()
|
||||
{
|
||||
$benutzergruppeID = $this->get('benutzergruppe_id');
|
||||
|
||||
if(isset($benutzergruppeID))
|
||||
{
|
||||
$result = $this->BenutzergruppeModel->load($benutzergruppeID);
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function postBenutzergruppe()
|
||||
{
|
||||
if($this->_validate($this->post()))
|
||||
{
|
||||
if(isset($this->post()['benutzergruppe_id']))
|
||||
{
|
||||
$result = $this->BenutzergruppeModel->update($this->post()['benutzergruppe_id'], $this->post());
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = $this->BenutzergruppeModel->insert($this->post());
|
||||
}
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
private function _validate($benutzergruppe = NULL)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
<?php
|
||||
/**
|
||||
* FH-Complete
|
||||
*
|
||||
* @package FHC-API
|
||||
* @author FHC-Team
|
||||
* @copyright Copyright (c) 2016, fhcomplete.org
|
||||
* @license GPLv3
|
||||
* @link http://fhcomplete.org
|
||||
* @since Version 1.0
|
||||
* @filesource
|
||||
*/
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
if(!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class Fotostatus extends APIv1_Controller
|
||||
{
|
||||
/**
|
||||
* Fotostatus API constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
// Load model FotostatusModel
|
||||
$this->load->model('person/fotostatus_model', 'FotostatusModel');
|
||||
// Load set the uid of the model to let to check the permissions
|
||||
$this->FotostatusModel->setUID($this->_getUID());
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function getFotostatus()
|
||||
{
|
||||
$fotostatusID = $this->get('fotostatus_id');
|
||||
|
||||
if(isset($fotostatusID))
|
||||
{
|
||||
$result = $this->FotostatusModel->load($fotostatusID);
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function postFotostatus()
|
||||
{
|
||||
if($this->_validate($this->post()))
|
||||
{
|
||||
if(isset($this->post()['fotostatus_id']))
|
||||
{
|
||||
$result = $this->FotostatusModel->update($this->post()['fotostatus_id'], $this->post());
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = $this->FotostatusModel->insert($this->post());
|
||||
}
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
private function _validate($fotostatus = NULL)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
<?php
|
||||
/**
|
||||
* FH-Complete
|
||||
*
|
||||
* @package FHC-API
|
||||
* @author FHC-Team
|
||||
* @copyright Copyright (c) 2016, fhcomplete.org
|
||||
* @license GPLv3
|
||||
* @link http://fhcomplete.org
|
||||
* @since Version 1.0
|
||||
* @filesource
|
||||
*/
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
if(!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class Freebusy extends APIv1_Controller
|
||||
{
|
||||
/**
|
||||
* Freebusy API constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
// Load model FreebusyModel
|
||||
$this->load->model('person/freebusy_model', 'FreebusyModel');
|
||||
// Load set the uid of the model to let to check the permissions
|
||||
$this->FreebusyModel->setUID($this->_getUID());
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function getFreebusy()
|
||||
{
|
||||
$freebusyID = $this->get('freebusy_id');
|
||||
|
||||
if(isset($freebusyID))
|
||||
{
|
||||
$result = $this->FreebusyModel->load($freebusyID);
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function postFreebusy()
|
||||
{
|
||||
if($this->_validate($this->post()))
|
||||
{
|
||||
if(isset($this->post()['freebusy_id']))
|
||||
{
|
||||
$result = $this->FreebusyModel->update($this->post()['freebusy_id'], $this->post());
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = $this->FreebusyModel->insert($this->post());
|
||||
}
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
private function _validate($freebusy = NULL)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
<?php
|
||||
/**
|
||||
* FH-Complete
|
||||
*
|
||||
* @package FHC-API
|
||||
* @author FHC-Team
|
||||
* @copyright Copyright (c) 2016, fhcomplete.org
|
||||
* @license GPLv3
|
||||
* @link http://fhcomplete.org
|
||||
* @since Version 1.0
|
||||
* @filesource
|
||||
*/
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
if(!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class Freebusytyp extends APIv1_Controller
|
||||
{
|
||||
/**
|
||||
* Freebusytyp API constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
// Load model FreebusytypModel
|
||||
$this->load->model('person/freebusytyp_model', 'FreebusytypModel');
|
||||
// Load set the uid of the model to let to check the permissions
|
||||
$this->FreebusytypModel->setUID($this->_getUID());
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function getFreebusytyp()
|
||||
{
|
||||
$freebusytypID = $this->get('freebusytyp_id');
|
||||
|
||||
if(isset($freebusytypID))
|
||||
{
|
||||
$result = $this->FreebusytypModel->load($freebusytypID);
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function postFreebusytyp()
|
||||
{
|
||||
if($this->_validate($this->post()))
|
||||
{
|
||||
if(isset($this->post()['freebusytyp_id']))
|
||||
{
|
||||
$result = $this->FreebusytypModel->update($this->post()['freebusytyp_id'], $this->post());
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = $this->FreebusytypModel->insert($this->post());
|
||||
}
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
private function _validate($freebusytyp = NULL)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
<?php
|
||||
/**
|
||||
* FH-Complete
|
||||
*
|
||||
* @package FHC-API
|
||||
* @author FHC-Team
|
||||
* @copyright Copyright (c) 2016, fhcomplete.org
|
||||
* @license GPLv3
|
||||
* @link http://fhcomplete.org
|
||||
* @since Version 1.0
|
||||
* @filesource
|
||||
*/
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
if(!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class Kontaktmedium extends APIv1_Controller
|
||||
{
|
||||
/**
|
||||
* Kontaktmedium API constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
// Load model KontaktmediumModel
|
||||
$this->load->model('person/kontaktmedium_model', 'KontaktmediumModel');
|
||||
// Load set the uid of the model to let to check the permissions
|
||||
$this->KontaktmediumModel->setUID($this->_getUID());
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function getKontaktmedium()
|
||||
{
|
||||
$kontaktmediumID = $this->get('kontaktmedium_id');
|
||||
|
||||
if(isset($kontaktmediumID))
|
||||
{
|
||||
$result = $this->KontaktmediumModel->load($kontaktmediumID);
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function postKontaktmedium()
|
||||
{
|
||||
if($this->_validate($this->post()))
|
||||
{
|
||||
if(isset($this->post()['kontaktmedium_id']))
|
||||
{
|
||||
$result = $this->KontaktmediumModel->update($this->post()['kontaktmedium_id'], $this->post());
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = $this->KontaktmediumModel->insert($this->post());
|
||||
}
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
private function _validate($kontaktmedium = NULL)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
<?php
|
||||
/**
|
||||
* FH-Complete
|
||||
*
|
||||
* @package FHC-API
|
||||
* @author FHC-Team
|
||||
* @copyright Copyright (c) 2016, fhcomplete.org
|
||||
* @license GPLv3
|
||||
* @link http://fhcomplete.org
|
||||
* @since Version 1.0
|
||||
* @filesource
|
||||
*/
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
if(!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class Kontakttyp extends APIv1_Controller
|
||||
{
|
||||
/**
|
||||
* Kontakttyp API constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
// Load model KontakttypModel
|
||||
$this->load->model('person/kontakttyp_model', 'KontakttypModel');
|
||||
// Load set the uid of the model to let to check the permissions
|
||||
$this->KontakttypModel->setUID($this->_getUID());
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function getKontakttyp()
|
||||
{
|
||||
$kontakttypID = $this->get('kontakttyp_id');
|
||||
|
||||
if(isset($kontakttypID))
|
||||
{
|
||||
$result = $this->KontakttypModel->load($kontakttypID);
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function postKontakttyp()
|
||||
{
|
||||
if($this->_validate($this->post()))
|
||||
{
|
||||
if(isset($this->post()['kontakttyp_id']))
|
||||
{
|
||||
$result = $this->KontakttypModel->update($this->post()['kontakttyp_id'], $this->post());
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = $this->KontakttypModel->insert($this->post());
|
||||
}
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
private function _validate($kontakttyp = NULL)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
<?php
|
||||
/**
|
||||
* FH-Complete
|
||||
*
|
||||
* @package FHC-API
|
||||
* @author FHC-Team
|
||||
* @copyright Copyright (c) 2016, fhcomplete.org
|
||||
* @license GPLv3
|
||||
* @link http://fhcomplete.org
|
||||
* @since Version 1.0
|
||||
* @filesource
|
||||
*/
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
if(!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class Notiz extends APIv1_Controller
|
||||
{
|
||||
/**
|
||||
* Notiz API constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
// Load model NotizModel
|
||||
$this->load->model('person/notiz_model', 'NotizModel');
|
||||
// Load set the uid of the model to let to check the permissions
|
||||
$this->NotizModel->setUID($this->_getUID());
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function getNotiz()
|
||||
{
|
||||
$notizID = $this->get('notiz_id');
|
||||
|
||||
if(isset($notizID))
|
||||
{
|
||||
$result = $this->NotizModel->load($notizID);
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function postNotiz()
|
||||
{
|
||||
if($this->_validate($this->post()))
|
||||
{
|
||||
if(isset($this->post()['notiz_id']))
|
||||
{
|
||||
$result = $this->NotizModel->update($this->post()['notiz_id'], $this->post());
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = $this->NotizModel->insert($this->post());
|
||||
}
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
private function _validate($notiz = NULL)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
<?php
|
||||
/**
|
||||
* FH-Complete
|
||||
*
|
||||
* @package FHC-API
|
||||
* @author FHC-Team
|
||||
* @copyright Copyright (c) 2016, fhcomplete.org
|
||||
* @license GPLv3
|
||||
* @link http://fhcomplete.org
|
||||
* @since Version 1.0
|
||||
* @filesource
|
||||
*/
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
if(!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class Notizzuordnung extends APIv1_Controller
|
||||
{
|
||||
/**
|
||||
* Notizzuordnung API constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
// Load model NotizzuordnungModel
|
||||
$this->load->model('person/notizzuordnung_model', 'NotizzuordnungModel');
|
||||
// Load set the uid of the model to let to check the permissions
|
||||
$this->NotizzuordnungModel->setUID($this->_getUID());
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function getNotizzuordnung()
|
||||
{
|
||||
$notizzuordnungID = $this->get('notizzuordnung_id');
|
||||
|
||||
if(isset($notizzuordnungID))
|
||||
{
|
||||
$result = $this->NotizzuordnungModel->load($notizzuordnungID);
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function postNotizzuordnung()
|
||||
{
|
||||
if($this->_validate($this->post()))
|
||||
{
|
||||
if(isset($this->post()['notizzuordnung_id']))
|
||||
{
|
||||
$result = $this->NotizzuordnungModel->update($this->post()['notizzuordnung_id'], $this->post());
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = $this->NotizzuordnungModel->insert($this->post());
|
||||
}
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
private function _validate($notizzuordnung = NULL)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user