JHtmlImage

Utility class working with images.

abstract
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
static deprecated

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

stringThe file name, eg foobar.png.

$folder

stringThe path to the image.

$altFile

integerEmpty: use $file and $folder, -1: show no image, not-empty: use $altFile and $altFolder.

$altFolder

stringAnother path. Only used for the contact us form based on the value of the imagelist param.

$alt

stringAlternative text.

$attribs

arrayAn associative array of attributes to add.

$asTag

booleanTrue (default) to display full tag, false to return just the path.

Response

stringThe 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
static deprecated

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

stringThe file name, eg foobar.png.

$folder

stringThe path to the image.

$altFile

integerEmpty: use $file and $folder, -1: show no image, not-empty: use $altFile and $altFolder.

$altFolder

stringAnother path. Only used for the contact us form based on the value of the imagelist param.

$alt

stringAlternative text.

$attribs

arrayAn associative array of attributes to add.

$asTag

booleanTrue (default) to display full tag, false to return just the path.

Response

stringThe value for the src or if $asTag is true, the full img html.