getModel(); $data = $model->toArray(); if (substr($data['configuration'], 0, 12) == '###AES128###') { // Load the server key file if necessary $key = Factory::getSecureSettings()->getKey(); $data['configuration'] = Factory::getSecureSettings()->decryptSettings($data['configuration'], $key); } $defaultName = $this->input->get('view', 'joomla', 'cmd'); $filename = $this->input->get('basename', $defaultName, 'cmd'); $document = $this->container->application->getDocument(); $document->setName($filename); echo json_encode($data);