Source for file pluginordering.php

Documentation is available at pluginordering.php

  1. <?php
  2. /**
  3.  * @package     Joomla.Administrator
  4.  * @subpackage  com_plugins
  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('JPATH_BASE'or die;
  11.  
  12.  
  13. /**
  14.  * Supports an HTML select list of plugins
  15.  *
  16.  * @package     Joomla.Administrator
  17.  * @subpackage  com_plugins
  18.  * @since       1.6
  19.  */
  20. {
  21.     /**
  22.      * The form field type.
  23.      *
  24.      * @var        string 
  25.      * @since   1.6
  26.      */
  27.     protected $type = 'Pluginordering';
  28.  
  29.     /**
  30.      * Builds the query for the ordering list.
  31.      *
  32.      * @return  JDatabaseQuery  The query for the ordering form field
  33.      */
  34.     protected function getQuery()
  35.     {
  36.         $db JFactory::getDbo();
  37.         $folder    $this->form->getValue('folder');
  38.  
  39.         // Build the query for the ordering list.
  40.         $query $db->getQuery(true)
  41.             ->select(array($db->quoteName('ordering''value')$db->quoteName('name''text')$db->quoteName('type')$db->quote('folder')$db->quote('extension_id')))
  42.             ->from($db->quoteName('#__extensions'))
  43.             ->where('(type =' $db->quote('plugin''AND folder=' $db->quote($folder')')
  44.             ->order('ordering');
  45.  
  46.         return $query;
  47.     }
  48.  
  49.     /**
  50.      * Retrieves the current Item's Id.
  51.      *
  52.      * @return  integer  The current item ID
  53.      */
  54.     protected function getItemId()
  55.     {
  56.         return (int) $this->form->getValue('extension_id');
  57.     }
  58. }

Documentation generated on Tue, 19 Nov 2013 15:10:49 +0100 by phpDocumentor 1.4.3