Add a directory where JHtml should search for helpers. You may either pass a string or an array of directories.
static
array
addIncludePath
([string $path = ''])
-
string
$path: A path to search.
Displays a calendar control field
static
string
calendar
(string $value, string $name, string $id, [string $format = '%Y-%m-%d'], [array $attribs = null])
-
string
$value: The date value
-
string
$name: The name of the text field
-
string
$id: The id of the text field
-
string
$format: The date format
-
array
$attribs: Additional HTML attributes
Function caller method
static
mixed
call
(string $function, array $args)
-
string
$function: Function or method to call
-
array
$args: Arguments to be passed to function
Add the /media/system/js/core Javascript file.
static
void
core
([boolean $debug = null])
-
boolean
$debug: True if debugging is enabled.
Returns formated date according to a given format and time zone.
static
string
date
([string $input = 'now'], [string $format = null], [mixed $tz = true], [boolean $gregorian = false])
-
string
$input: String in a format accepted by date(), defaults to "now".
-
string
$format: Format optional format for strftime
-
mixed
$tz: Time zone to be used for the date. Special cases: boolean true for user setting, boolean false for server setting.
-
boolean
$gregorian: True to use Gregorian calenar
Method to extract a key
static
array
extract
(string $key)
-
string
$key: The name of helper method to load, (prefix).(class).function prefix and class are optional and can be used to load custom html helpers.
Write a <iframe></iframe> element
static
string
iframe
(string $url, string $name, [array $attribs = null], [string $noFrames = ''])
-
string
$url: The relative URL to use for the src attribute
-
string
$name: The target attribute to use
-
array
$attribs: An associative array of attributes to add
-
string
$noFrames: The message to display if the iframe tag is not supported
Write a <img></img> element
static
string
image
(string $file, string $alt, [string $attribs = null], [array $relative = false], [boolean $path_only = false])
-
string
$file: The relative or absolute URL to use for the src attribute
-
string
$alt: The alt text.
-
string
$attribs: The target attribute to use
-
array
$relative: An associative array of attributes to add
-
boolean
$path_only: If set to true, it tries to find an override for the file in the template
Compute the files to be include
static
array
includeRelativeFiles
(string $folder, string $file, boolean $relative, boolean $detect_browser, boolean $detect_debug)
-
string
$folder: folder name to search into (images, css, js, ...)
-
string
$file: path to file
-
boolean
$relative: path to file is relative to /media folder
-
boolean
$detect_browser: detect browser to include specific browser files
-
boolean
$detect_debug: detect debug to include compressed files if debug is on
Test if the key is registered.
static
boolean
isRegistered
(string $key)
-
string
$key: The name of the key
Write a <a></a> element
static
string
link
(string $url, string $text, [array $attribs = null])
-
string
$url: The relative URL to use for the href attribute
-
string
$text: The target attribute to use
-
array
$attribs: An associative array of attributes to add
Registers a function to be called with a specific key
static
boolean
register
(string $key, string $function)
-
string
$key: The name of the key
-
string
$function: Function or method
Write a <script></script> element
static
mixed
script
(string $file, [boolean $framework = false], [boolean $relative = false], [boolean $path_only = false], [boolean $detect_browser = true], [boolean $detect_debug = true])
-
string
$file: path to file
-
boolean
$framework: load the JS framework
-
boolean
$relative: path to file is relative to /media folder
-
boolean
$path_only: return the path to the file only
-
boolean
$detect_browser: detect browser to include specific browser js files
-
boolean
$detect_debug: detect debug to search for compressed files if debug is on
Set format related options.
Updates the formatOptions array with all valid values in the passed array. See {@see JHtml::$formatOptions} for details.
static
void
setFormatOptions
(array $options)
-
array
$options: Option key/value pairs.
Write a <link rel="stylesheet" style="text/css" /> element
static
mixed
stylesheet
(string $file, [array $attribs = array()], [boolean $relative = false], [boolean $path_only = false], [boolean $detect_browser = true], [boolean $detect_debug = true])
-
string
$file: path to file
-
array
$attribs: attributes to be added to the stylesheet
-
boolean
$relative: path to file is relative to /media folder
-
boolean
$path_only: return the path to the file only
-
boolean
$detect_browser:
detect browser to include specific browser css files will try to include file, file_*browser*, file_*browser*_*major*, file_*browser*_*major*_*minor* <table> <tr><th>Navigator</th> <th>browser</th> <th>major.minor</th></tr>
<tr><td>Safari 3.0.x</td> <td>konqueror</td> <td>522.x</td></tr> <tr><td>Safari 3.1.x and 3.2.x</td> <td>konqueror</td> <td>525.x</td></tr> <tr><td>Safari 4.0 to 4.0.2</td> <td>konqueror</td> <td>530.x</td></tr> <tr><td>Safari 4.0.3 to 4.0.4</td> <td>konqueror</td> <td>531.x</td></tr> <tr><td>iOS 4.0 Safari</td> <td>konqueror</td> <td>532.x</td></tr> <tr><td>Safari 5.0</td> <td>konqueror</td> <td>533.x</td></tr>
<tr><td>Google Chrome 1.0</td> <td>konqueror</td> <td>528.x</td></tr> <tr><td>Google Chrome 2.0</td> <td>konqueror</td> <td>530.x</td></tr> <tr><td>Google Chrome 3.0 and 4.x</td> <td>konqueror</td> <td>532.x</td></tr> <tr><td>Google Chrome 5.0</td> <td>konqueror</td> <td>533.x</td></tr>
<tr><td>Internet Explorer 5.5</td> <td>msie</td> <td>5.5</td></tr> <tr><td>Internet Explorer 6.x</td> <td>msie</td> <td>6.x</td></tr> <tr><td>Internet Explorer 7.x</td> <td>msie</td> <td>7.x</td></tr> <tr><td>Internet Explorer 8.x</td> <td>msie</td> <td>8.x</td></tr>
<tr><td>Firefox</td> <td>mozilla</td> <td>5.0</td></tr> </table> a lot of others
-
boolean
$detect_debug: detect debug to search for compressed files if debug is on
Creates a tooltip with an image as button
static
string
tooltip
(string $tooltip, [mixed $title = ''], [string $image = 'tooltip.png'], [string $text = ''], [string $href = ''], [string $alt = 'Tooltip'], [string $class = 'hasTip'])
-
string
$tooltip: The tip string
-
mixed
$title: The title of the tooltip or an associative array with keys contained in {'title','image','text','href','alt'} and values corresponding to parameters of the same name.
-
string
$image: The image for the tip, if no text is provided
-
string
$text: The text for the tip
-
string
$href: An URL that will be used to create the link
-
string
$alt: The alt attribute for img tag
-
string
$class: CSS class for the tool tip
Removes a key for a method from registry.
static
boolean
unregister
(string $key)
-
string
$key: The name of the key
Class loader method
Additional arguments may be supplied and are passed to the sub-class. Additional include paths are also able to be specified for third-party use
static
mixed
_
(string $key)
-
string
$key: The name of helper method to load, (prefix).(class).function prefix and class are optional and can be used to load custom html helpers.
Compute the files to be include
static
array
_includeRelativeFiles
(string $file, boolean $relative, boolean $detect_browser, string $folder)
-
string
$file: path to file
-
boolean
$relative: path to file is relative to /media folder
-
boolean
$detect_browser: detect browser to include specific browser files
-
string
$folder: folder name to search into (images, css, js, ...)