Joomla CMS  3.10.11 (avec JPlatform 13.1 inclus)
Documentation des API du CMS Joomla en version 3.10.11 et du framework Joomla Platform intégré
Référence de la classe JHtmlGrid

Fonctions membres publiques statiques

static boolean ($i, $value, $taskOn=null, $taskOff=null)
 
static sort ($title, $order, $direction='asc', $selected='', $task=null, $newDirection='asc', $tip='', $form=null)
 
static checkall ($name='checkall-toggle', $tip='JGLOBAL_CHECK_ALL', $action='Joomla.checkAll(this)')
 
static id ($rowNum, $recId, $checkedOut=false, $name='cid', $stub='cb')
 
static checkedOut (&$row, $i, $identifier='id')
 
static published ($value, $i, $img1='tick.png', $img0='publish_x.png', $prefix='')
 
static state ($filterState=' *', $published='JPUBLISHED', $unpublished='JUNPUBLISHED', $archived=null, $trashed=null)
 
static order ($rows, $image='filesave.png', $task='saveorder')
 
static behavior ()
 

Fonctions membres protégées statiques

static _checkedOut (&$row, $overlib=true)
 

Description détaillée

Utility class for creating HTML Grids

Depuis
1.5

Documentation des fonctions membres

◆ _checkedOut()

static _checkedOut ( $row,
  $overlib = true 
)
staticprotected

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

Paramètres
object&$rowThe row object
boolean$overlibTrue if an overlib with checkout information should be created.
Renvoie
string HTMl for the icon and overlib
Depuis
1.5

◆ behavior()

static behavior ( )
static

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

Renvoie
void
Depuis
1.6
Obsolète:
4.0 This is only used in hathor and will be removed without replacement

◆ boolean()

static boolean (   $i,
  $value,
  $taskOn = null,
  $taskOff = null 
)
static

Display a boolean setting widget.

Paramètres
integer$iThe row index.
integer$valueThe value of the boolean field.
string$taskOnTask to turn the boolean setting on.
string$taskOffTask to turn the boolean setting off.
Renvoie
string The boolean setting widget.
Depuis
1.6
Obsolète:
4.0 This is only used in hathor and will be removed without replacement

Références $i, $task, $title, $value, task, et toggle.

◆ checkall()

static checkall (   $name = 'checkall-toggle',
  $tip = 'JGLOBAL_CHECK_ALL',
  $action = 'Joomla.checkAll(this)' 
)
static

Method to check all checkboxes in a grid

Paramètres
string$nameThe name of the form element
string$tipThe text shown as tooltip title instead of $tip
string$actionThe action to perform on clicking the checkbox
Renvoie
string
Depuis
3.1.2

Références $action, et $name.

◆ checkedOut()

static checkedOut ( $row,
  $i,
  $identifier = 'id' 
)
static

Displays a checked out icon.

Paramètres
object&$rowA data object (must contain checkedout as a property).
integer$iThe index of the row.
string$identifierThe property name of the primary key or index of the row.
Renvoie
string
Depuis
1.5

Références $i, $row, et $user.

◆ id()

static id (   $rowNum,
  $recId,
  $checkedOut = false,
  $name = 'cid',
  $stub = 'cb' 
)
static

Method to create a checkbox for a grid row.

Paramètres
integer$rowNumThe row index
integer$recIdThe record id
boolean$checkedOutTrue if item is checked out
string$nameThe name of the form element
string$stubThe name of stub identifier
Renvoie
mixed String of html with a checkbox if item is not checked out, null if checked out.
Depuis
1.5

Références $name.

◆ order()

static order (   $rows,
  $image = 'filesave.png',
  $task = 'saveorder' 
)
static

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

Paramètres
array$rowsThe array of rows of rows
string$imageThe image [UNUSED]
string$taskThe task to use, defaults to save order
Renvoie
string
Depuis
1.5

◆ published()

static published (   $value,
  $i,
  $img1 = 'tick.png',
  $img0 = 'publish_x.png',
  $prefix = '' 
)
static

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

Paramètres
mixed$valueEither the scalar value or an object (for backward compatibility, deprecated)
integer$iThe index
string$img1Image for a positive or on value
string$img0Image for the empty or off value
string$prefixAn optional prefix for the task
Renvoie
string
Depuis
1.5

Références $action, $alt, $i, $img, $prefix, $task, et $value.

◆ sort()

static sort (   $title,
  $order,
  $direction = 'asc',
  $selected = '',
  $task = null,
  $newDirection = 'asc',
  $tip = '',
  $form = null 
)
static

Method to sort a column in a grid

Paramètres
string$titleThe link title
string$orderThe order field for the column
string$directionThe current direction
string$selectedThe selected ordering
string$taskAn optional task override
string$newDirectionAn optional direction for the new column
string$tipAn optional text shown as tooltip title instead of $title
string$formAn optional form selector
Renvoie
string
Depuis
1.5

Références $html, et $title.

◆ state()

static state (   $filterState = '*',
  $published = 'JPUBLISHED',
  $unpublished = 'JUNPUBLISHED',
  $archived = null,
  $trashed = null 
)
static

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

Paramètres
string$filterStateThe initial filter state
string$publishedThe JText string for published
string$unpublishedThe JText string for Unpublished
string$archivedThe JText string for Archived
string$trashedThe JText string for Trashed
Renvoie
string
Depuis
1.5

La documentation de cette classe a été générée à partir du fichier suivant :