Abstract Class JHtmlGrid

Description

Utility class for creating HTML Grids

  • abstract:
  • since: 1.5

Located in /libraries/cms/html/grid.php (line 19)


	
			
Method Summary
 static void behavior ()
 static string boolean (integer $i, integer $value, [string $taskOn = null], [string $taskOff = null])
 static string checkall ([string $name = 'checkall-toggle'], [string $tip = 'JGLOBAL_CHECK_ALL'], [string $action = 'Joomla.checkAll(this)'])
 static string checkedOut (object &$row, integer $i, [string $identifier = 'id'])
 static mixed id (integer $rowNum, integer $recId, [boolean $checkedOut = false], [string $name = 'cid'])
 static string order (array $rows, [string $image = 'filesave.png'], [string $task = 'saveorder'])
 static string published (mixed $value, integer $i, [string $img1 = 'tick.png'], [string $img0 = 'publish_x.png'], [string $prefix = ''])
 static string sort (string $title, string $order, [string $direction = 'asc'], [string $selected = 0], [string $task = null], [string $new_direction = 'asc'], [string $tip = ''])
 static string state ([string $filter_state = '*'], [string $published = 'Published'], [string $unpublished = 'Unpublished'], [string $archived = null], [string $trashed = null])
 static string _checkedOut (object &$row, [boolean $overlib = true])
Methods
static behavior (line 312)

Method to build the behavior script and add it to the document head.

  • since: 1.6
  • access: public
static void behavior ()
static boolean (line 33)

Display a boolean setting widget.

  • return: The boolean setting widget.
  • since: 1.6
  • access: public
static string boolean (integer $i, integer $value, [string $taskOn = null], [string $taskOff = null])
  • integer $i: The row index.
  • integer $value: The value of the boolean field.
  • string $taskOn: Task to turn the boolean setting on.
  • string $taskOff: Task to turn the boolean setting off.
static checkall (line 124)

Method to check all checkboxes in a grid

  • since: 3.1.2
  • access: public
static string checkall ([string $name = 'checkall-toggle'], [string $tip = 'JGLOBAL_CHECK_ALL'], [string $action = 'Joomla.checkAll(this)'])
  • string $name: The name of the form element
  • string $tip: The text shown as tooltip title instead of $tip
  • string $action: The action to perform on clicking the checkbox
static checkedOut (line 160)

Displays a checked out icon.

  • since: 1.5
  • access: public
static string checkedOut (object &$row, integer $i, [string $identifier = 'id'])
  • object &$row: A data object (must contain checkedout as a property).
  • integer $i: The index of the row.
  • string $identifier: The property name of the primary key or index of the row.
static id (line 143)

Method to create a checkbox for a grid row.

  • return: String of html with a checkbox if item is not checked out, null if checked out.
  • since: 1.5
  • access: public
static mixed id (integer $rowNum, integer $recId, [boolean $checkedOut = false], [string $name = 'cid'])
  • integer $rowNum: The row index
  • integer $recId: The record id
  • boolean $checkedOut: True if item is checke out
  • string $name: The name of the form element
static order (line 271)

Method to create an icon for saving a new ordering in a grid

  • since: 1.5
  • access: public
static string order (array $rows, [string $image = 'filesave.png'], [string $task = 'saveorder'])
  • array $rows: The array of rows of rows
  • string $image: The image [UNUSED]
  • string $task: The task to use, defaults to save order
static published (line 204)

Method to create a clickable icon to change the state of an item

  • since: 1.5
  • access: public
static string published (mixed $value, integer $i, [string $img1 = 'tick.png'], [string $img0 = 'publish_x.png'], [string $prefix = ''])
  • mixed $value: Either the scalar value or an object (for backward compatibility, deprecated)
  • integer $i: The index
  • string $img1: Image for a positive or on value
  • string $img0: Image for the empty or off value
  • string $prefix: An optional prefix for the task
static sort (line 74)

Method to sort a column in a grid

  • since: 1.5
  • access: public
static string sort (string $title, string $order, [string $direction = 'asc'], [string $selected = 0], [string $task = null], [string $new_direction = 'asc'], [string $tip = ''])
  • string $title: The link title
  • string $order: The order field for the column
  • string $direction: The current direction
  • string $selected: The selected ordering
  • string $task: An optional task override
  • string $new_direction: An optional direction for the new column
  • string $tip: An optional text shown as tooltip title instead of $title
static state (line 234)

Method to create a select list of states for filtering By default the filter shows only published and unpublished items

  • since: 1.5
  • access: public
static string state ([string $filter_state = '*'], [string $published = 'Published'], [string $unpublished = 'Unpublished'], [string $archived = null], [string $trashed = null])
  • string $filter_state: The initial filter state
  • string $published: The JText string for published
  • string $unpublished: The JText string for Unpublished
  • string $archived: The JText string for Archived
  • string $trashed: The JText string for Trashed
static _checkedOut (line 287)

Method to create a checked out icon with optional overlib in a grid.

  • return: HTMl for the icon and overlib
  • since: 1.5
  • access: protected
static string _checkedOut (object &$row, [boolean $overlib = true])
  • object &$row: The row object
  • boolean $overlib: True if an overlib with checkout information should be created.

Documentation generated on Tue, 19 Nov 2013 15:04:03 +0100 by phpDocumentor 1.4.3