/** * Get a json list of products * @api */ function getList() { $response = array(); $model = $this->getModel($this->get('suffix')); parent::_setModelState(); $products = $model->getList(); echo json_encode($products); // Close the application. JFactory::getApplication()->close(); }