JHtmlImage
Utility class working with images.
package |
Joomla.Platform |
---|---|
subpackage |
HTML |
since |
11.1 |
Methods
administrator
Checks to see if an image exists in the current templates image directory if it does it loads this image. Otherwise the default image is loaded.
administrator(string $file, string $folder = '/images/', integer $altFile = null, string $altFolder = '/images/', string $alt = null, array $attribs = null, boolean $asTag = true) : string
Also can be used in conjunction with the menulist param to create the chosen image load the default or use no image
since |
11.1 |
---|---|
deprecated |
12.1 |
Arguments
- $file
string
The file name, eg foobar.png.- $folder
string
The path to the image.- $altFile
integer
Empty: use $file and $folder, -1: show no image, not-empty: use $altFile and $altFolder.- $altFolder
string
Another path. Only used for the contact us form based on the value of the imagelist param.- $alt
string
Alternative text.- $attribs
array
An associative array of attributes to add.- $asTag
boolean
True (default) to display full tag, false to return just the path.
Response
string
The src or the full img tag if $asTag is true.
site
Checks to see if an image exists in the current templates image directory.
site(string $file, string $folder = '/images/system/', integer $altFile = null, string $altFolder = '/images/system/', string $alt = null, array $attribs = null, boolean $asTag = true) : string
If it does it loads this image. Otherwise the default image is loaded. Also can be used in conjunction with the menulist param to create the chosen image load the default or use no image.
since |
11.1 |
---|---|
deprecated |
12.1 |
Arguments
- $file
string
The file name, eg foobar.png.- $folder
string
The path to the image.- $altFile
integer
Empty: use $file and $folder, -1: show no image, not-empty: use $altFile and $altFolder.- $altFolder
string
Another path. Only used for the contact us form based on the value of the imagelist param.- $alt
string
Alternative text.- $attribs
array
An associative array of attributes to add.- $asTag
boolean
True (default) to display full tag, false to return just the path.
Response
string
The value for the src or if $asTag is true, the full img html.