|
static | _ ($key) |
|
static | register ($key, $function) |
|
static | unregister ($key) |
|
static | isRegistered ($key) |
|
static | link ($url, $text, $attribs=null) |
|
static | iframe ($url, $name, $attribs=null, $noFrames='') |
|
static | image ($file, $alt, $attribs=null, $relative=false, $returnPath=0) |
|
static | stylesheet ($file, $options=array(), $attribs=array()) |
|
static | script ($file, $options=array(), $attribs=array()) |
|
static | setFormatOptions ($options) |
|
static | date ($input='now', $format=null, $tz=true, $gregorian=false) |
|
static | tooltip ($tooltip, $title='', $image='tooltip.png', $text='', $href='', $alt='Tooltip', $class='hasTooltip') |
|
static | tooltipText ($title='', $content='', $translate=true, $escape=true) |
|
static | calendar ($value, $name, $id, $format='%Y-%m-%d', $attribs=array()) |
|
static | addIncludePath ($path='') |
|
static | getJSObject (array $array=array()) |
|
|
static | $formatOptions = array('format.depth' => 0, 'format.eol' => "\n", 'format.indent' => "\t") |
|
Utility class for all HTML drawing classes
- Depuis
- 1.5
◆ _()
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
- Paramètres
-
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. |
- Renvoie
- mixed Result of HTMLHelper::call($function, $args)
- Depuis
- 1.5
- Exceptions
-
Références $className, $file, $function, $key, $path, $prefix, et JLoader\register().
Référencé par PlgEditorTinymce\onDisplay(), PlgEditorTinymce\onDisplayLegacy(), et Text\script().
◆ addIncludePath()
static addIncludePath |
( |
|
$path = '' | ) |
|
|
static |
Add a directory where HTMLHelper should search for helpers. You may either pass a string or an array of directories.
- Paramètres
-
string | $path | A path to search. |
- Renvoie
- array An array with directory elements
- Depuis
- 1.5
Références $path.
◆ calendar()
static calendar |
( |
|
$value, |
|
|
|
$name, |
|
|
|
$id, |
|
|
|
$format = '%Y-%m-%d' , |
|
|
|
$attribs = array() |
|
) |
| |
|
static |
Displays a calendar control field
- Paramètres
-
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 |
mixed | $attribs | Additional HTML attributes The array can have the following keys: readonly Sets the readonly parameter for the input tag disabled Sets the disabled parameter for the input tag autofocus Sets the autofocus parameter for the input tag autocomplete Sets the autocomplete parameter for the input tag filter Sets the filter for the input tag |
- Renvoie
- string HTML markup for a calendar field
- Depuis
- 1.5
Références $attribs, $autocomplete, $autofocus, $class, $data, $direction, $disabled, $filter, $format, $hint, $id, $inputvalue, $name, $onchange, $readonly, $required, $value, elseif, Factory\getDbo(), Factory\getDocument(), Factory\getLanguage(), JPATH_ROOT, null, et LayoutHelper\render().
◆ call()
static call |
( |
|
$function, |
|
|
|
$args |
|
) |
| |
|
staticprotected |
Function caller method
- Paramètres
-
callable | $function | Function or method to call |
array | $args | Arguments to be passed to function |
- Renvoie
- mixed Function result or false on error.
1.6
Références $function.
◆ date()
static date |
( |
|
$input = 'now' , |
|
|
|
$format = null , |
|
|
|
$tz = true , |
|
|
|
$gregorian = false |
|
) |
| |
|
static |
Returns formatted date according to a given format and time zone.
- Paramètres
-
string | $input | String in a format accepted by date(), defaults to "now". |
string | $format | The date format specification string (see PHP_MANUAL#date). |
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 calendar. |
- Renvoie
- string A date translated by the given format and time zone.
- Voir également
- strftime
- Depuis
- 1.5
Références $date, $format, $input, elseif, Factory\getConfig(), Factory\getDate(), Factory\getLanguage(), Factory\getUser(), et null.
◆ extract()
Method to extract a key
- Paramètres
-
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. |
- Renvoie
- array Contains lowercase key, prefix, file, function.
- Depuis
- 1.6
Références $file, $key, $parts, et $prefix.
◆ getJSObject()
static getJSObject |
( |
array |
$array = array() | ) |
|
|
static |
◆ getMd5Version()
static getMd5Version |
( |
|
$path | ) |
|
|
staticprotected |
Include version with MD5SUM file in path.
- Paramètres
-
string | $path | Folder name to search into (images, css, js, ...). |
- Renvoie
- string Query string to add.
- Depuis
- 3.7.0
- Obsolète:
- 4.0 Usage of MD5SUM files is deprecated, use version instead.
Références $path, Log\add(), et Log\WARNING.
◆ iframe()
static iframe |
( |
|
$url, |
|
|
|
$name, |
|
|
|
$attribs = null , |
|
|
|
$noFrames = '' |
|
) |
| |
|
static |
Write a <iframe>
element
- Paramètres
-
string | $url | The relative URL to use for the src attribute. |
string | $name | The target attribute to use. |
array | string | $attribs | Attributes to be added to the <iframe> element |
string | $noFrames | The message to display if the iframe tag is not supported. |
- Renvoie
- string
- Depuis
- 1.5
Références $attribs, $name, $url, et ArrayHelper\toString().
◆ image()
static image |
( |
|
$file, |
|
|
|
$alt, |
|
|
|
$attribs = null , |
|
|
|
$relative = false , |
|
|
|
$returnPath = 0 |
|
) |
| |
|
static |
Write a <img>
element
- Paramètres
-
string | $file | The relative or absolute URL to use for the src attribute. |
string | $alt | The alt text. |
array | string | $attribs | Attributes to be added to the <img> element |
boolean | $relative | Flag if the path to the file is relative to the /media folder (and searches in template). |
integer | $returnPath | Defines the return value for the method: -1: Returns a <img> tag without looking for relative files 0: Returns a <img> tag while searching for relative files 1: Returns the file path to the image while searching for relative files |
- Renvoie
- string|null HTML markup for the image, relative path to the image, or null if path is to be returned but image is not found
- Depuis
- 1.5
Références $alt, $attribs, $file, null, et ArrayHelper\toString().
◆ includeRelativeFiles()
static includeRelativeFiles |
( |
|
$folder, |
|
|
|
$file, |
|
|
|
$relative, |
|
|
|
$detectBrowser, |
|
|
|
$detectDebug |
|
) |
| |
|
staticprotected |
Compute the files to be included
- Paramètres
-
string | $folder | Folder name to search in (i.e. images, css, js). |
string | $file | Path to file. |
boolean | $relative | Flag if the path to the file is relative to the /media folder (and searches in template). |
boolean | $detectBrowser | Flag if the browser should be detected to include specific browser files. |
boolean | $detectDebug | Flag if debug mode is enabled to include uncompressed files if debug is on. |
- Renvoie
- array files to be included.
- Voir également
- JBrowser
- Depuis
- 1.6
Références $extension, $file, $files, $path, $template, Uri\base(), Factory\getApplication(), Factory\getConfig(), Browser\getInstance(), JPATH_ROOT, JPATH_THEMES, et Uri\root().
◆ isRegistered()
static isRegistered |
( |
|
$key | ) |
|
|
static |
Test if the key is registered.
- Paramètres
-
string | $key | The name of the key |
- Renvoie
- boolean True if the key is registered.
- Depuis
- 1.6
Références $key.
◆ link()
static link |
( |
|
$url, |
|
|
|
$text, |
|
|
|
$attribs = null |
|
) |
| |
|
static |
Write a <a>
element
- Paramètres
-
string | $url | The relative URL to use for the href attribute |
string | $text | The target attribute to use |
array | string | $attribs | Attributes to be added to the <a> element |
- Renvoie
- string
- Depuis
- 1.5
Références $attribs, $text, $url, et ArrayHelper\toString().
◆ register()
static register |
( |
|
$key, |
|
|
|
$function |
|
) |
| |
|
static |
Registers a function to be called with a specific key
- Paramètres
-
string | $key | The name of the key |
string | $function | Function or method |
- Renvoie
- boolean True if the function is callable
- Depuis
- 1.6
Références $function, et $key.
◆ script()
static script |
( |
|
$file, |
|
|
|
$options = array() , |
|
|
|
$attribs = array() |
|
) |
| |
|
static |
Write a <script>
element to load a JavaScript file
- Paramètres
-
string | $file | Path to file. |
array | $options | Array of options. Example: array('version' => 'auto', 'conditional' => 'lt IE 9') |
array | $attribs | Array of attributes. Example: array('id' => 'scriptid', 'async' => 'async', 'data-test' => 1) |
- Renvoie
- array|string|null Nothing if $returnPath is false, null, path or array of path if specific JavaScript browser files were detected
- Voir également
- HTMLHelper::stylesheet()
- Depuis
- 1.5
- Obsolète:
- 4.0 The (file, framework, relative, pathOnly, detectBrowser, detectDebug) method signature is deprecated, use (file, options, attributes) instead.
Références $attribs, $document, $file, $options, Log\add(), Factory\getDocument(), et Log\WARNING.
◆ setFormatOptions()
static setFormatOptions |
( |
|
$options | ) |
|
|
static |
Set format related options.
Updates the formatOptions array with all valid values in the passed array.
- Paramètres
-
array | $options | Option key/value pairs. |
- Renvoie
- void
- Voir également
- HTMLHelper::$formatOptions
- Depuis
- 1.5
Références $key, et $options.
◆ stylesheet()
static stylesheet |
( |
|
$file, |
|
|
|
$options = array() , |
|
|
|
$attribs = array() |
|
) |
| |
|
static |
Write a <link>
element to load a CSS file
- Paramètres
-
string | $file | Path to file |
array | $options | Array of options. Example: array('version' => 'auto', 'conditional' => 'lt IE 9') |
array | $attribs | Array of attributes. Example: array('id' => 'scriptid', 'async' => 'async', 'data-test' => 1) |
- Renvoie
- array|string|null nothing if $returnPath is false, null, path or array of path if specific CSS browser files were detected
- Voir également
- Browser
- Depuis
- 1.5
- Obsolète:
- 4.0 The (file, attribs, relative, pathOnly, detectBrowser, detectDebug) method signature is deprecated, use (file, options, attributes) instead.
Références $attribs, $document, $file, $options, Log\add(), Factory\getDocument(), et Log\WARNING.
◆ tooltip()
static tooltip |
( |
|
$tooltip, |
|
|
|
$title = '' , |
|
|
|
$image = 'tooltip.png' , |
|
|
|
$text = '' , |
|
|
|
$href = '' , |
|
|
|
$alt = 'Tooltip' , |
|
|
|
$class = 'hasTooltip' |
|
) |
| |
|
static |
Creates a tooltip with an image as button
- Paramètres
-
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 | A 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. |
- Renvoie
- string
- Depuis
- 1.5
Références $alt, $class, $href, $image, $param, $text, $title, $tooltip, ENT_COMPAT, htmlspecialchars, et null.
◆ tooltipText()
static tooltipText |
( |
|
$title = '' , |
|
|
|
$content = '' , |
|
|
|
$translate = true , |
|
|
|
$escape = true |
|
) |
| |
|
static |
Converts a double colon separated string or 2 separate strings to a string ready for bootstrap tooltips
- Paramètres
-
string | $title | The title of the tooltip (or combined '::' separated string). |
string | $content | The content to tooltip. |
boolean | $translate | If true will pass texts through JText. |
boolean | $escape | If true will pass texts through htmlspecialchars. |
- Renvoie
- string The tooltip string
- Depuis
- 3.1.2
Références $content, $title, elseif, et htmlspecialchars.
◆ unregister()
static unregister |
( |
|
$key | ) |
|
|
static |
Removes a key for a method from registry.
- Paramètres
-
string | $key | The name of the key |
- Renvoie
- boolean True if a set key is unset
- Depuis
- 1.6
Références $key.
◆ $formatOptions
$formatOptions = array('format.depth' => 0, 'format.eol' => "\n", 'format.indent' => "\t") |
|
static |
◆ $includePaths
◆ $registry
La documentation de cette classe a été générée à partir du fichier suivant :