/**
  * Method to save the submitted ordering values for records via AJAX.
  *
  * @throws Exception
  * @return  void
  */
 public function loadProject()
 {
     // Get the input
     $query = $this->input->get->get('query', "", 'string');
     $response = new Prism\Response\Json();
     try {
         $options = array("published" => Prism\Constants::PUBLISHED, "approved" => Prism\Constants::APPROVED);
         $projects = new Crowdfunding\Projects(JFactory::getDbo());
         $projects->loadByString($query, $options);
         $projectData = $projects->toOptions();
     } catch (Exception $e) {
         JLog::add($e->getMessage());
         throw new Exception(JText::_('COM_CROWDFUNDING_ERROR_SYSTEM'));
     }
     $response->setData($projectData)->success();
     echo $response;
     JFactory::getApplication()->close();
 }