Back to Grid class

Method checkall

public static string
checkall
(mixed $name = 'checkall-toggle', mixed $action = 'Joomla.checkAll(this)')
Method to check all checkboxes in a grid
Parameters
  • string $name The name of the form element
  • string $action The action to perform on clicking the checkbox
Returns
  • string
Since
  • 3.1.2
Class: Grid
Project: Joomla

Method checkall - Source code

/**
 * Method to check all checkboxes in a grid
 *
 * @param   string  $name    The name of the form element
 * @param   string  $action  The action to perform on clicking the checkbox
 *
 * @return  string
 *
 * @since   3.1.2
 */
public static function checkall($name = 'checkall-toggle', $action = 'Joomla.checkAll(this)')
{
    HTMLHelper::_('behavior.core');
    return '<input class="form-check-input" autocomplete="off" type="checkbox" name="' . $name . '" value="" title="' . Text::_('JGLOBAL_CHECK_ALL') . '" onclick="' . $action . '">';
}