Joomla CMS  4.2.2
Documentation des API du CMS Joomla en version 4.2.2
Tout Structures de données Espaces de nommage Fichiers Fonctions Variables Pages
Référence de la classe Grid

Fonctions membres publiques statiques

static sort ($title, $order, $direction='asc', $selected='', $task=null, $newDirection='asc', $tip='', $form=null)
 
static checkall ($name='checkall-toggle', $action='Joomla.checkAll(this)')
 
static id ($rowNum, $recId, $checkedOut=false, $name='cid', $stub='cb', $title='', $formId=null)
 
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')
 

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

◆ checkall()

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

Method to check all checkboxes in a grid

Paramètres
string$nameThe name of the form element
string$actionThe action to perform on clicking the checkbox
Renvoie
string
Depuis
3.1.2

◆ checkedOut()

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

Displays a checked out icon.

Paramètres
object$rowA data object (must contain checked out 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

◆ id()

static id (   $rowNum,
  $recId,
  $checkedOut = false,
  $name = 'cid',
  $stub = 'cb',
  $title = '',
  $formId = null 
)
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
string$titleThe name of the item
string$formIdAn optional form selector.
Renvoie
mixed String of html with a checkbox if item is not checked out, null if checked out.
Depuis
1.5

◆ 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

◆ 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 $direction, $form, $icon, $selected, HTMLHelper\_(), et content.

◆ 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 Text string for published
string$unpublishedThe Text string for Unpublished
string$archivedThe Text string for Archived
string$trashedThe Text string for Trashed
Renvoie
string
Depuis
1.5

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