FH
in package
Helpers does not need to be aware of the component.
It is just a set of utility functions that can be used throughout the extensions.
Table of Contents
Methods
- autoload() : mixed
- Loads vendor libraries from foundry
- checkToken() : mixed
- Checks for valid token
- clearCache() : mixed
- Clears the cache in the CMS
- connector() : mixed
- Creates an instance of the connector library
- date() : mixed
- Creates a new date instance
- escape() : mixed
- Escapes a string
- exception() : mixed
- Renders the exception library
- extractKeywords() : mixed
- Simple implementation to extract keywords from a string
- getBaseEmailTemplatesFolder() : mixed
- Retrieve the folder path of the base email templates
- getCacheBustHash() : mixed
- Generates the hash based on foundry version
- getCurrentLanguageCode() : mixed
- Retrieve the current site language code
- getCurrentLanguageTag() : mixed
- Retrieve the current site language tag
- getCurrentTemplate() : mixed
- Retrieves the current site template
- getDefaultAvatar() : mixed
- Retrieve the default avatar
- getEditor() : mixed
- Retrieve the Joomla editor since J3 and J4 behave differently
- getEditors() : mixed
- Retrieves a list of editors from the site
- getIp() : mixed
- Retrieve the IP address
- getJoomlaLanguages() : mixed
- Retrieves a list of languages on the site
- getJoomlaTimezones() : mixed
- Retrieves current timezones in Joomla
- getJoomlaVersion() : mixed
- Retrieves the current Joomla version
- getLanguages() : mixed
- Retrieve available Joomla languages
- getMediaPath() : mixed
- Generates the relative path to assets folder
- getNullDate() : mixed
- Retrieve the null date value
- getSiteName() : mixed
- Retrieves the configured site name
- getTemplateOverrideFolder() : mixed
- Retrieves the current site template
- getTemplateOverrideFolderUri() : mixed
- Retrieves the current site template
- getTwoFactorMethods() : mixed
- Ride on Joomla's User helper library to obtain two factor methods
- getURI() : mixed
- Returns a JURI instance.
- getUserGroupsTree() : mixed
- Retrieves a list of user groups from the site
- getVersion() : mixed
- Retrieves the current Foundry version
- getXml() : mixed
- Reads a XML file.
- giphy() : mixed
- Retrieves the GIPHY library
- hasTwoFactor() : mixed
- Determines if the site has two factor authentication support
- isArtioEnabled() : mixed
- 3PD: Artio JoomSEF
- isArtioLanguageEnabled() : mixed
- 3PD: Artio JoomSEF
- isFromAdmin() : mixed
- Determines if the user is viewing from the backend
- isHttps() : mixed
- Determine if the site is running on https
- isImagickEnabled() : mixed
- Determines if image magick extension is enabled on the server
- isJoomla31() : mixed
- Determines if the current instance of Joomla is 3.1 and above
- isJoomla4() : mixed
- Determines if the site is using Joomla 4 currently
- isJoomla5() : mixed
- Determines if the site is using Joomla 5 currently
- isLoggedIn() : mixed
- Determines if current view is logged into the site
- isMultiLingual() : mixed
- Determines if the site has multi lingual capability
- isRegistrationEnabled() : mixed
- Determines if user registration is enabled in Joomla
- isRTL() : mixed
- Determines if the current document is on RTL mode
- isSEF() : mixed
- Determine whether the site enable SEF.
- isSefEnabled() : mixed
- Determines if SEF is enabled
- isSiteAdmin() : mixed
- Determines if the user is a super admin on the site.
- jconfig() : mixed
- Renders Joomla's configuration object
- loadLanguage() : mixed
- Loads the language for the extension
- makeArray() : mixed
- Converts an argument into an array.
- makeFolder() : mixed
- Creates a folder on the filesystem based on the path given. If it doesn't exist, create it.
- minifyCSS() : mixed
- Given contents from css, minify the content
- minifyScript() : mixed
- Minifies scripts via compiler server
- normalize() : mixed
- Allows caller to pass in an array of data to normalize the data
- normalizeSchema() : mixed
- Converts characters to HTML entities for Schema structure data
- normalizeSeparator() : mixed
- Normalize directory separator
- pagination() : mixed
- Retrieves the pagination library
- pluralize() : mixed
- Pluralize a given string
- qrcode() : mixed
- Render the qrcode libraries
- rebuildSearch() : mixed
- Rebuilds search database for the extension
- registry() : mixed
- Proxy for Joomla's registry object
- renderColorPicker() : mixed
- Renders color picker library from Joomla
- renderjQueryFramework() : mixed
- Abstract method to load jQuery from Joomla
- renderModalLibrary() : mixed
- Renders modal library from Joomla
- responsive() : mixed
- Renders the responsive library
- table() : mixed
- Genereal method to retrieve the table
- textavatar() : mixed
- Retrieves the textavatar library
- toCurrencyFormat() : mixed
- Converts a given number to a currency format
- token() : mixed
- Retrieves the token for the user
- truncateWithHtml() : mixed
- Truncate string while maintaining the HTML integrity of the string
Methods
autoload()
Loads vendor libraries from foundry
public
static autoload() : mixed
Tags
checkToken()
Checks for valid token
public
static checkToken() : mixed
Tags
clearCache()
Clears the cache in the CMS
public
static clearCache() : mixed
Tags
connector()
Creates an instance of the connector library
public
static connector([mixed $url = '' ]) : mixed
Parameters
- $url : mixed = ''
Tags
date()
Creates a new date instance
public
static date([mixed $current = '' ][, mixed $offset = null ]) : mixed
Parameters
- $current : mixed = ''
- $offset : mixed = null
Tags
escape()
Escapes a string
public
static escape(mixed $str) : mixed
Parameters
- $str : mixed
Tags
exception()
Renders the exception library
public
static exception(mixed $message[, mixed $type = FD_ERROR ][, mixed $previous = null ]) : mixed
Parameters
- $message : mixed
- $type : mixed = FD_ERROR
- $previous : mixed = null
Tags
extractKeywords()
Simple implementation to extract keywords from a string
public
static extractKeywords(mixed $string) : mixed
Parameters
- $string : mixed
Tags
getBaseEmailTemplatesFolder()
Retrieve the folder path of the base email templates
public
static getBaseEmailTemplatesFolder([mixed $override = false ]) : mixed
Deprecated. Use it from Mail Models
Parameters
- $override : mixed = false
Tags
getCacheBustHash()
Generates the hash based on foundry version
public
static getCacheBustHash() : mixed
Tags
getCurrentLanguageCode()
Retrieve the current site language code
public
static getCurrentLanguageCode([mixed $section = 'site' ]) : mixed
Parameters
- $section : mixed = 'site'
Tags
getCurrentLanguageTag()
Retrieve the current site language tag
public
static getCurrentLanguageTag() : mixed
Tags
getCurrentTemplate()
Retrieves the current site template
public
static getCurrentTemplate() : mixed
Tags
getDefaultAvatar()
Retrieve the default avatar
public
static getDefaultAvatar() : mixed
Tags
getEditor()
Retrieve the Joomla editor since J3 and J4 behave differently
public
static getEditor([mixed $type = null ]) : mixed
Parameters
- $type : mixed = null
Tags
getEditors()
Retrieves a list of editors from the site
public
static getEditors() : mixed
Tags
getIp()
Retrieve the IP address
public
static getIp() : mixed
Tags
getJoomlaLanguages()
Retrieves a list of languages on the site
public
static getJoomlaLanguages() : mixed
Tags
getJoomlaTimezones()
Retrieves current timezones in Joomla
public
static getJoomlaTimezones() : mixed
Tags
getJoomlaVersion()
Retrieves the current Joomla version
public
static getJoomlaVersion() : mixed
Tags
getLanguages()
Retrieve available Joomla languages
public
static getLanguages([mixed $selected = '' ][, mixed $subname = true ]) : mixed
Parameters
- $selected : mixed = ''
- $subname : mixed = true
Tags
getMediaPath()
Generates the relative path to assets folder
public
static getMediaPath([mixed $type = 'css' ]) : mixed
Parameters
- $type : mixed = 'css'
Tags
getNullDate()
Retrieve the null date value
public
static getNullDate() : mixed
Tags
getSiteName()
Retrieves the configured site name
public
static getSiteName() : mixed
Tags
getTemplateOverrideFolder()
Retrieves the current site template
public
static getTemplateOverrideFolder(mixed $extension[, mixed $relative = false ]) : mixed
Parameters
- $extension : mixed
- $relative : mixed = false
Tags
getTemplateOverrideFolderUri()
Retrieves the current site template
public
static getTemplateOverrideFolderUri(mixed $extension[, mixed $relative = false ][, mixed $stackideasOverride = false ]) : mixed
Parameters
- $extension : mixed
- $relative : mixed = false
- $stackideasOverride : mixed = false
Tags
getTwoFactorMethods()
Ride on Joomla's User helper library to obtain two factor methods
public
static getTwoFactorMethods() : mixed
Tags
getURI()
Returns a JURI instance.
public
static getURI([mixed $requestPath = false ]) : mixed
Parameters
- $requestPath : mixed = false
Tags
getUserGroupsTree()
Retrieves a list of user groups from the site
public
static getUserGroupsTree() : mixed
Tags
getVersion()
Retrieves the current Foundry version
public
static getVersion() : mixed
Tags
getXml()
Reads a XML file.
public
static getXml(mixed $data[, mixed $isFile = true ]) : mixed
Parameters
- $data : mixed
- $isFile : mixed = true
Tags
giphy()
Retrieves the GIPHY library
public
static giphy(mixed $fd) : mixed
Parameters
- $fd : mixed
Tags
hasTwoFactor()
Determines if the site has two factor authentication support
public
static hasTwoFactor() : mixed
Tags
isArtioEnabled()
3PD: Artio JoomSEF
public
static isArtioEnabled() : mixed
Determines if Artio JoomSEF is enabled on the site
Tags
isArtioLanguageEnabled()
3PD: Artio JoomSEF
public
static isArtioLanguageEnabled() : mixed
Determines if JoomSEF extension is enabled and has multi language enabled
Tags
isFromAdmin()
Determines if the user is viewing from the backend
public
static isFromAdmin() : mixed
Tags
isHttps()
Determine if the site is running on https
public
static isHttps() : mixed
Tags
isImagickEnabled()
Determines if image magick extension is enabled on the server
public
static isImagickEnabled() : mixed
Tags
isJoomla31()
Determines if the current instance of Joomla is 3.1 and above
public
static isJoomla31() : mixed
Tags
isJoomla4()
Determines if the site is using Joomla 4 currently
public
static isJoomla4() : mixed
Tags
isJoomla5()
Determines if the site is using Joomla 5 currently
public
static isJoomla5() : mixed
Tags
isLoggedIn()
Determines if current view is logged into the site
public
static isLoggedIn() : mixed
Tags
isMultiLingual()
Determines if the site has multi lingual capability
public
static isMultiLingual() : mixed
Tags
isRegistrationEnabled()
Determines if user registration is enabled in Joomla
public
static isRegistrationEnabled() : mixed
Tags
isRTL()
Determines if the current document is on RTL mode
public
static isRTL() : mixed
Tags
isSEF()
Determine whether the site enable SEF.
public
static isSEF() : mixed
Tags
isSefEnabled()
Determines if SEF is enabled
public
static isSefEnabled() : mixed
Tags
isSiteAdmin()
Determines if the user is a super admin on the site.
public
static isSiteAdmin([mixed $id = null ]) : mixed
Parameters
- $id : mixed = null
Tags
jconfig()
Renders Joomla's configuration object
public
static jconfig() : mixed
Tags
loadLanguage()
Loads the language for the extension
public
static loadLanguage(mixed $component[, mixed $path = JPATH_ROOT ]) : mixed
Parameters
- $component : mixed
- $path : mixed = JPATH_ROOT
Tags
makeArray()
Converts an argument into an array.
public
static makeArray(mixed $item[, mixed $delimeter = null ]) : mixed
Parameters
- $item : mixed
- $delimeter : mixed = null
Tags
makeFolder()
Creates a folder on the filesystem based on the path given. If it doesn't exist, create it.
public
static makeFolder(mixed $path) : mixed
Parameters
- $path : mixed
Tags
minifyCSS()
Given contents from css, minify the content
public
static minifyCSS(mixed $codes) : mixed
Parameters
- $codes : mixed
Tags
minifyScript()
Minifies scripts via compiler server
public
static minifyScript(mixed $contents) : mixed
Parameters
- $contents : mixed
Tags
normalize()
Allows caller to pass in an array of data to normalize the data
public
static normalize(mixed $data, mixed $key[, mixed $default = null ]) : mixed
Parameters
- $data : mixed
- $key : mixed
- $default : mixed = null
Tags
normalizeSchema()
Converts characters to HTML entities for Schema structure data
public
static normalizeSchema(mixed $schemaContent) : mixed
Parameters
- $schemaContent : mixed
Tags
normalizeSeparator()
Normalize directory separator
public
static normalizeSeparator(mixed $path) : mixed
Parameters
- $path : mixed
Tags
pagination()
Retrieves the pagination library
public
static pagination(mixed $fd, mixed $total, mixed $limitstart, mixed $limit) : mixed
Parameters
- $fd : mixed
- $total : mixed
- $limitstart : mixed
- $limit : mixed
Tags
pluralize()
Pluralize a given string
public
static pluralize(mixed $count, mixed $singularString, mixed $pluralString) : mixed
Parameters
- $count : mixed
- $singularString : mixed
- $pluralString : mixed
Tags
qrcode()
Render the qrcode libraries
public
static qrcode() : mixed
Tags
rebuildSearch()
Rebuilds search database for the extension
public
static rebuildSearch(mixed $data) : mixed
Parameters
- $data : mixed
Tags
registry()
Proxy for Joomla's registry object
public
static registry([mixed $contents = '' ][, mixed $isFile = false ]) : mixed
Parameters
- $contents : mixed = ''
- $isFile : mixed = false
Tags
renderColorPicker()
Renders color picker library from Joomla
public
static renderColorPicker() : mixed
Tags
renderjQueryFramework()
Abstract method to load jQuery from Joomla
public
static renderjQueryFramework() : mixed
Tags
renderModalLibrary()
Renders modal library from Joomla
public
static renderModalLibrary() : mixed
Tags
responsive()
Renders the responsive library
public
static responsive() : mixed
Tags
table()
Genereal method to retrieve the table
public
static table(mixed $name, mixed $prefix[, mixed $config = [] ]) : mixed
Parameters
- $name : mixed
- $prefix : mixed
- $config : mixed = []
Tags
textavatar()
Retrieves the textavatar library
public
static textavatar([mixed $options = [] ]) : mixed
Parameters
- $options : mixed = []
Tags
toCurrencyFormat()
Converts a given number to a currency format
public
static toCurrencyFormat(mixed $number) : mixed
Parameters
- $number : mixed
Tags
token()
Retrieves the token for the user
public
static token() : mixed
Tags
truncateWithHtml()
Truncate string while maintaining the HTML integrity of the string
public
static truncateWithHtml(mixed $text[, mixed $max = 250 ][, mixed $ending = '' ][, mixed $exact = false ]) : mixed
Parameters
- $text : mixed
- $max : mixed = 250
- $ending : mixed = ''
- $exact : mixed = false