. */ if (! defined('BASEPATH')) exit('No direct script access allowed'); /** * This controller operates between (interface) the JS (GUI) and the back-end * Provides data to the ajax get calls about languages * This controller works with JSON calls on the HTTP GET and the output is always JSON */ class Language extends FHCAPI_Controller { public function __construct() { parent::__construct([ 'get' => self::PERM_LOGGED ]); // Load models $this->load->model('system/Sprache_model', 'SpracheModel'); } public function get() { $this->SpracheModel->addOrder('sprache'); $result = $this->SpracheModel->load(); $data = $this->getDataOrTerminateWithError($result); $this->terminateWithSuccess($data); } }