Class JHtmlGrid

Description

Utility class for creating HTML Grids

  • abstract:
  • since: 11.1

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


	
			
Method Summary
static string access (integer &$row, integer $i, [boolean $archived = null])
static void behavior ()
static string boolean (integer $i, integer $value, [string $taskOn = null], [string $taskOff = null])
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'])
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 = 1])
Methods
static method access (line 139)

Deprecated method to change access level in a grid

  • deprecated: 12.1
  • since: 11.1
  • access: public
static string access (integer &$row, integer $i, [boolean $archived = null])
  • integer &$row: Row id
  • integer $i: Row index
  • boolean $archived: True if the item is archived
static method behavior (line 347)

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

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

Display a boolean setting widget.

  • return: The boolean setting widget.
  • since: 11.1
  • 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 method checkedOut (line 186)

Displays a checked out icon.

  • since: 11.1
  • 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 method id (line 113)

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.
  • 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 method order (line 302)

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

  • since: 11.1
  • 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
  • string $task: The task to use, defaults to save order
static method published (line 234)

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

  • since: 11.1
  • 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 method sort (line 74)

Method to sort a column in a grid

  • since: 11.1
  • access: public
static string sort (string $title, string $order, [string $direction = 'asc'], [string $selected = 0], [string $task = null], [string $new_direction = 'asc'])
  • 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
static method state (line 266)

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

  • since: 11.1
  • 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 method _checkedOut (line 321)

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

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

Documentation generated on Mon, 25 Jun 2012 13:55:04 -0500 by phpDocumentor 1.4.4