english/libraries/joomla/html/html/grid.php
/**
	 * Display a boolean setting widget.
	 *
	 * @param   integer  The row index.
	 * @param   integer  The value of the boolean field.
	 * @param   string   Task to turn the boolean setting on.
	 * @param   string   Task to turn the boolean setting off.
	 *
	 * @return  string   The boolean setting widget.
	 * @since    11.1
	 */
Display a boolean setting widget.
@param   integer  The row index.
@param   integer  The value of the boolean field.
@param   string   Task to turn the boolean setting on.
@param   string   Task to turn the boolean setting off.

@return  string   The boolean setting widget.
Display a boolean setting widget . @param integer The row index . @param integer The value of the boolean field . @param string Task to turn the boolean setting on . @param string Task to turn the boolean setting off . @return string The boolean setting widget .
static function boolean($i, $value, $taskOn = null, $taskOff = null)
	{
		self::behavior();
		$title = ($value) ? JText::_('JYES') : JText::_('JNO');
		$title .= '::'.JText::_('JGLOBAL_CLICK_TO_TOGGLE_STATE');
		$bool	= ($value) ? 'true' : 'false';
		$task	= ($value) ? $taskOff : $taskOn;
		$toggle	= (!$task) ? false : true;
		if ($toggle) {
			$html = '<a class="grid_'.$bool.' hasTip" title="'.$title.'" rel="{id:\'cb'.$i.'\', task:\''.$task.'\'}" href="#toggle"></a>';
		}
		else {
			$html = '<a class="grid_'.$bool.'" rel="{id:\'cb'.$i.'\', task:\''.$task.'\'}"></a>';
		}
		return $html;
	}
static function boolean ( $ i , $ value , $ taskOn = null , $ taskOff = null ) { self :: behavior ( ) ; $ title = ( $ value ) ? JText :: _ ( 'JYES' ) : JText :: _ ( 'JNO' ) ; $ title .= '::' . JText :: _ ( 'JGLOBAL_CLICK_TO_TOGGLE_STATE' ) ; $ bool = ( $ value ) ? 'true' : 'false' ; $ task = ( $ value ) ? $ taskOff : $ taskOn ; $ toggle = ( ! $ task ) ? false : true ; if ( $ toggle ) { $ html = '<a class="grid_' . $ bool . ' hasTip" title="' . $ title . '" rel="{id:\'cb' . $ i . '\', task:\'' . $ task . '\'}" href="#toggle"></a>' ; } else { $ html = '<a class="grid_' . $ bool . '" rel="{id:\'cb' . $ i . '\', task:\'' . $ task . '\'}"></a>' ; } return $ html ; }
Display a boolean setting widget.
Display a boolean setting widget .
// Load the behavior. // Build the title. // Build the <a> tag.