Source for file ordering.php

Documentation is available at ordering.php

  1. <?php
  2. /**
  3.  * @package    FrameworkOnFramework
  4.  * @subpackage form
  5.  * @copyright  Copyright (C) 2010 - 2012 Akeeba Ltd. All rights reserved.
  6.  * @license    GNU General Public License version 2 or later; see LICENSE.txt
  7.  */
  8. // Protect from unauthorized access
  9. defined('_JEXEC'or die;
  10.  
  11. /**
  12.  * Ordering field header
  13.  *
  14.  * @package  FrameworkOnFramework
  15.  * @since    2.0
  16.  */
  17. {
  18.     /**
  19.      * Get the header
  20.      *
  21.      * @return  string  The header HTML
  22.      */
  23.     protected function getHeader()
  24.     {
  25.         $sortable ($this->element['sortable'!= 'false');
  26.  
  27.         $view $this->form->getView();
  28.         $model $this->form->getModel();
  29.  
  30.         $hasAjaxOrderingSupport $view->hasAjaxOrderingSupport();
  31.  
  32.         if (!$sortable)
  33.         {
  34.             // Non sortable?! I'm not sure why you'd want that, but if you insist...
  35.             return JText::_('JGRID_HEADING_ORDERING');
  36.         }
  37.  
  38.         if (!$hasAjaxOrderingSupport)
  39.         {
  40.             // Ye olde Joomla! 2.5 method
  41.             $html JHTML::_('grid.sort''JFIELD_ORDERING_LABEL''ordering'$view->getLists()->order_Dir$view->getLists()->order'browse');
  42.             $html .= JHTML::_('grid.order'$model->getList());
  43.  
  44.             return $html;
  45.         }
  46.         else
  47.         {
  48.             // The new, drag'n'drop ordering support
  49.             return JHtml::_(
  50.                 'grid.sort',
  51.                 '<i class="icon-menu-2"></i>',
  52.                 'ordering',
  53.                 $view->getLists()->order_Dir,
  54.                 $view->getLists()->order,
  55.                 null,
  56.                 'asc',
  57.                 'JGRID_HEADING_ORDERING'
  58.             );
  59.         }
  60.     }
  61. }

Documentation generated on Tue, 19 Nov 2013 15:09:53 +0100 by phpDocumentor 1.4.3