Source for file languages.php

Documentation is available at languages.php

  1. <?php
  2. /**
  3.  * @package     Joomla.Administrator
  4.  * @subpackage  com_languages
  5.  *
  6.  * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
  7.  * @license     GNU General Public License version 2 or later; see LICENSE.txt
  8.  */
  9.  
  10. defined('_JEXEC'or die;
  11.  
  12. /**
  13.  * @package     Joomla.Administrator
  14.  * @subpackage  com_languages
  15.  * @since       1.6
  16.  */
  17. {
  18.     /**
  19.      * Method to get a model object, loading it if required.
  20.      *
  21.      * @param   string  $name    The model name. Optional.
  22.      * @param   string  $prefix  The class prefix. Optional.
  23.      * @param   array   $config  Configuration array for model. Optional.
  24.      *
  25.      * @return  object  The model.
  26.      *
  27.      * @since   1.6
  28.      */
  29.     public function getModel($name 'Language'$prefix 'LanguagesModel'$config array('ignore_request' => true))
  30.     {
  31.         $model parent::getModel($name$prefix$config);
  32.         return $model;
  33.     }
  34.  
  35.     /**
  36.      * Method to save the submitted ordering values for records via AJAX.
  37.      *
  38.      * @return  void 
  39.      *
  40.      * @since   3.1
  41.      */
  42.     public function saveOrderAjax()
  43.     {
  44.         $pks $this->input->post->get('cid'array()'array');
  45.         $order $this->input->post->get('order'array()'array');
  46.  
  47.         // Sanitize the input
  48.         JArrayHelper::toInteger($pks);
  49.         JArrayHelper::toInteger($order);
  50.  
  51.         // Get the model
  52.         $model $this->getModel();
  53.  
  54.         // Save the ordering
  55.         $return $model->saveorder($pks$order);
  56.  
  57.         if ($return)
  58.         {
  59.             echo "1";
  60.         }
  61.  
  62.         // Close the application
  63.         JFactory::getApplication()->close();
  64.     }
  65. }

Documentation generated on Tue, 19 Nov 2013 15:06:37 +0100 by phpDocumentor 1.4.3