Back to SortableList class

Method sortable

public static void
sortable
(mixed $tableId, mixed $formId, mixed $sortDir = 'asc', mixed $saveOrderingUrl = null, mixed $proceedSaveOrderButton = true, mixed $nestedList = false)
Method to load the Sortable script and make table sortable
Parameters
  • string $tableId DOM id of the table
  • string $formId DOM id of the form
  • string $sortDir Sort direction
  • string $saveOrderingUrl Save ordering url, ajax-load after an item dropped
  • bool $proceedSaveOrderButton Set whether a save order button is displayed
  • bool $nestedList Set whether the list is a nested list
Returns
  • void
Since
  • 3.0
Deprecated
  • 5.0
Class: SortableList
Project: Joomla

Method sortable - Source code

/**
 * Method to load the Sortable script and make table sortable
 *
 * @param   string   $tableId                 DOM id of the table
 * @param   string   $formId                  DOM id of the form
 * @param   string   $sortDir                 Sort direction
 * @param   string   $saveOrderingUrl         Save ordering url, ajax-load after an item dropped
 * @param   boolean  $proceedSaveOrderButton  Set whether a save order button is displayed
 * @param   boolean  $nestedList              Set whether the list is a nested list
 *
 * @return  void
 *
 * @since   3.0
 * @deprecated  5.0  In Joomla 4 call JHtml::_('draggablelist.draggable') and add a class of js-draggable to the tbody element of the table
 */
public static function sortable($tableId, $formId, $sortDir = 'asc', $saveOrderingUrl = null, $proceedSaveOrderButton = true, $nestedList = false)
{
    HTMLHelper::_('draggablelist.draggable', $tableId, $formId, $sortDir, $saveOrderingUrl, $proceedSaveOrderButton, $nestedList);
}