Back to Joomla project (class list)

Class JGrid - list of methods

Utility class for creating HTML Grids

Direct known subclasses

Package: Joomla\CMS\HTML\Helpers
Copyright: (C) 2009 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
Located at: Joomla/HTML/Helpers/JGrid.php
Project: Joomla

Method Summary

public static string
(mixed $i, mixed $task, mixed $prefix = '', mixed $activeTitle = '', mixed $inactiveTitle = '', mixed $tip = false, mixed $activeClass = '', mixed $inactiveClass = '', mixed $enabled = true, mixed $translate = true, mixed $checkbox = 'cb', mixed $formId = null)

Returns an action on a grid
Parameters
  • int $i The row index
  • string $task The task to fire
  • string|array $prefix An optional task prefix or an array of options
  • string $activeTitle An optional active tooltip to display if $enable is true
  • string $inactiveTitle An optional inactive tooltip to display if $enable is true
  • bool $tip An optional setting for tooltip
  • string $activeClass An optional active HTML class
  • string $inactiveClass An optional inactive HTML class
  • bool $enabled An optional setting for access control on the action.
  • bool $translate An optional setting for translation.
  • string $checkbox An optional prefix for checkboxes.
  • string $formId An optional form selector.
Returns
  • string The HTML markup
Since
  • 1.6
Show source code of this method: action Source Code

public static string
(mixed $states, mixed $value, mixed $i, mixed $prefix = '', mixed $enabled = true, mixed $translate = true, mixed $checkbox = 'cb', mixed $formId = null)

Returns a state on a grid
Parameters
  • array $states array of value/state. Each state is an array of the form (task, text, active title, inactive title, tip (boolean), HTML active class, HTML inactive class) or ('task'=>task, 'text'=>text, 'active_title'=>active title, 'inactive_title'=>inactive title, 'tip'=>boolean, 'active_class'=>html active class, 'inactive_class'=>html inactive class)
  • int $value The state value.
  • int $i The row index
  • string|array $prefix An optional task prefix or an array of options
  • bool $enabled An optional setting for access control on the action.
  • bool $translate An optional setting for translation.
  • string $checkbox An optional prefix for checkboxes.
  • string $formId An optional form selector.
Returns
  • string The HTML markup
Since
  • 1.6
Show source code of this method: state Source Code

public static string
(mixed $value, mixed $i, mixed $prefix = '', mixed $enabled = true, mixed $checkbox = 'cb', mixed $publishUp = null, mixed $publishDown = null, mixed $formId = null)

Returns a published state on a grid
Parameters
  • int $value The state value.
  • int $i The row index
  • string|array $prefix An optional task prefix or an array of options
  • bool $enabled An optional setting for access control on the action.
  • string $checkbox An optional prefix for checkboxes.
  • string $publishUp An optional start publishing date.
  • string $publishDown An optional finish publishing date.
  • string $formId An optional form selector.
Returns
  • string The HTML markup
Since
  • 1.6
-
  • \Joomla\CMS\HTML\Helpers\JHtmlJGrid::state()
Show source code of this method: published Source Code

public static string
(mixed $value, mixed $i, mixed $prefix = '', mixed $enabled = true, mixed $checkbox = 'cb', mixed $formId = null, mixed $active_class = 'icon-color-featured icon-star', mixed $inactive_class = 'icon-unfeatured')

Returns an isDefault state on a grid
Parameters
  • int $value The state value.
  • int $i The row index
  • string|array $prefix An optional task prefix or an array of options
  • bool $enabled An optional setting for access control on the action.
  • string $checkbox An optional prefix for checkboxes.
  • string $formId An optional form selector.
  • string $active_class The class for active items.
  • string $inactive_class The class for inactive items.
Returns
  • string The HTML markup
Since
  • 1.6
-
  • \Joomla\CMS\HTML\Helpers\JHtmlJGrid::state()
Show source code of this method: isdefault Source Code

public static array
(mixed $config = array())

Returns an array of standard published state filter options.
Parameters
  • array $config An array of configuration options. This array can contain a list of key/value pairs where values are boolean and keys can be taken from 'published', 'unpublished', 'archived', 'trash', 'all'. These pairs determine which values are displayed.
Returns
  • array The array of standard published state filter options
Since
  • 1.6
Show source code of this method: publishedOptions Source Code

public static string
(mixed $i, mixed $editorName, mixed $time, mixed $prefix = '', mixed $enabled = false, mixed $checkbox = 'cb', mixed $formId = null)

Returns a checked-out icon
Parameters
  • int $i The row index.
  • string $editorName The name of the editor.
  • string $time The time that the object was checked out.
  • string|array $prefix An optional task prefix or an array of options
  • bool $enabled True to enable the action.
  • string $checkbox An optional prefix for checkboxes.
  • string $formId An optional form selector.
Returns
  • string The HTML markup
Since
  • 1.6
Show source code of this method: checkedout Source Code

public static string
(mixed $i, mixed $task = 'orderup', mixed $prefix = '', mixed $text = 'JLIB_HTML_MOVE_UP', mixed $enabled = true, mixed $checkbox = 'cb', mixed $formId = null)

Creates an order-up action icon.
Parameters
  • int $i The row index.
  • string $task An optional task to fire.
  • string|array $prefix An optional task prefix or an array of options
  • string $text An optional text to display
  • bool $enabled An optional setting for access control on the action.
  • string $checkbox An optional prefix for checkboxes.
  • string $formId An optional form selector.
Returns
  • string The HTML markup
Since
  • 1.6
Show source code of this method: orderUp Source Code

public static string
(mixed $i, mixed $task = 'orderdown', mixed $prefix = '', mixed $text = 'JLIB_HTML_MOVE_DOWN', mixed $enabled = true, mixed $checkbox = 'cb', mixed $formId = null)

Creates an order-down action icon.
Parameters
  • int $i The row index.
  • string $task An optional task to fire.
  • string|array $prefix An optional task prefix or an array of options
  • string $text An optional text to display
  • bool $enabled An optional setting for access control on the action.
  • string $checkbox An optional prefix for checkboxes.
  • string $formId An optional form selector.
Returns
  • string The HTML markup
Since
  • 1.6
Show source code of this method: orderDown Source Code

Tags Summary

Since
1.6