[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/src/HTML/Helpers/ -> SortableList.php (source)

   1  <?php
   2  
   3  /**
   4   * Joomla! Content Management System
   5   *
   6   * @copyright  (C) 2012 Open Source Matters, Inc. <https://www.joomla.org>
   7   * @license    GNU General Public License version 2 or later; see LICENSE.txt
   8   */
   9  
  10  namespace Joomla\CMS\HTML\Helpers;
  11  
  12  use Joomla\CMS\HTML\HTMLHelper;
  13  
  14  // phpcs:disable PSR1.Files.SideEffects
  15  \defined('JPATH_PLATFORM') or die;
  16  // phpcs:enable PSR1.Files.SideEffects
  17  
  18  /**
  19   * HTML utility class for creating a sortable table list
  20   *
  21   * @since  3.0
  22   * @deprecated  5.0  Sortable List will be deprecated in favour of a new dragula script in 4.0
  23   */
  24  abstract class SortableList
  25  {
  26      /**
  27       * Method to load the Sortable script and make table sortable
  28       *
  29       * @param   string   $tableId                 DOM id of the table
  30       * @param   string   $formId                  DOM id of the form
  31       * @param   string   $sortDir                 Sort direction
  32       * @param   string   $saveOrderingUrl         Save ordering url, ajax-load after an item dropped
  33       * @param   boolean  $proceedSaveOrderButton  Set whether a save order button is displayed
  34       * @param   boolean  $nestedList              Set whether the list is a nested list
  35       *
  36       * @return  void
  37       *
  38       * @since   3.0
  39       * @deprecated  5.0  In Joomla 4 call JHtml::_('draggablelist.draggable') and add a class of js-draggable to the tbody element of the table
  40       */
  41      public static function sortable($tableId, $formId, $sortDir = 'asc', $saveOrderingUrl = null, $proceedSaveOrderButton = true, $nestedList = false)
  42      {
  43          HTMLHelper::_('draggablelist.draggable', $tableId, $formId, $sortDir, $saveOrderingUrl, $proceedSaveOrderButton, $nestedList);
  44      }
  45  }


Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer