Perform an ACL check.
boolean
authorise
(string $action, string $assetname)
-
string
$action: The ACL privilege to check, e.g. core.edit
-
string
$assetname: The asset name to check, typically the component's name
Redefinition of:
- FOFPlatform::authorise()
- Perform an ACL check.
Implementation of:
- FOFPlatformInterface::authorise()
- Perform an ACL check. Please note that FOF uses by default the Joomla! CMS convention for ACL privileges, e.g core.edit for the edit privilege.
Authorise access to the component in the back-end.
boolean
authorizeAdmin
(string $component)
-
string
$component: The name of the component.
Redefinition of:
- FOFPlatform::authorizeAdmin()
- Authorise access to the component in the back-end.
Implementation of:
- FOFPlatformInterface::authorizeAdmin()
- By default FOF will only use the Controller's onBefore* methods to
Clears the cache of system-wide FOF data. You are supposed to call this in
your components' installation script post-installation and post-upgrade methods or whenever you are modifying the structure of database tables accessed by FOF. Please note that FOF's cache never expires and is not purged by Joomla!. You MUST use this method to manually purge the cache.
boolean
clearCache
()
Redefinition of:
- FOFPlatform::clearCache()
- Clears the cache of system-wide FOF data. You are supposed to call this in
Implementation of:
- FOFPlatformInterface::clearCache()
- Clears the cache of system-wide FOF data. You are supposed to call this in
Retrieves data from the cache. This is supposed to be used for system-side FOF data, not application data.
string
getCache
(string $key, [string $default = null])
-
string
$key: The key of the data to retrieve
-
string
$default: The default value to return if the key is not found or the cache is not populated
Redefinition of:
- FOFPlatform::getCache()
- Retrieves data from the cache. This is supposed to be used for system-side FOF data, not application data.
Implementation of:
- FOFPlatformInterface::getCache()
- Retrieves data from the cache. This is supposed to be used for system-side FOF data, not application data.
Returns the base (root) directories for a given component.
array
getComponentBaseDirs
(string $component)
-
string
$component: The name of the component. For Joomla! this is something like "com_example"
Redefinition of:
- FOFPlatform::getComponentBaseDirs()
- Returns the base (root) directories for a given component.
Implementation of:
- FOFPlatformInterface::getComponentBaseDirs()
- Returns the base (root) directories for a given component. The "component" is used in the sense of what we call "component" in Joomla!, "plugin" in WordPress and "module" in Drupal, i.e. an application which is running inside our main application (CMS).
Returns the JDocument object which handles this component's response.
Redefinition of:
- FOFPlatform::getDocument()
- Returns the JDocument object which handles this component's response.
Implementation of:
- FOFPlatformInterface::getDocument()
- Returns the JDocument object which handles this component's response. You may also return null and FOF will a. try to figure out the output type by examining the "format" input parameter (or fall back to "html") and b.
Return the absolute path to the application's template overrides directory for a specific component. We will use it to look for template files instead of the regular component directorues. If the application does not have such a thing as template overrides return an empty string.
string
getTemplateOverridePath
(string $component, [boolean $absolute = true])
-
string
$component: The name of the component for which to fetch the overrides
-
boolean
$absolute: Should I return an absolute or relative path?
Redefinition of:
- FOFPlatform::getTemplateOverridePath()
- Return the absolute path to the application's template overrides directory for a specific component. We will use it to look for template files instead of the regular component directorues. If the application does not have such a thing as template overrides return an empty string.
Implementation of:
- FOFPlatformInterface::getTemplateOverridePath()
- Return the absolute path to the application's template overrides directory for a specific component. We will use it to look for template files instead of the regular component directorues. If the application does not have such a thing as template overrides return an empty string.
Get application-specific suffixes to use with template paths. This allows you to look for view template overrides based on the application version.
array
getTemplateSuffixes
()
Redefinition of:
- FOFPlatform::getTemplateSuffixes()
- Get application-specific suffixes to use with template paths. This allows you to look for view template overrides based on the application version.
Implementation of:
- FOFPlatformInterface::getTemplateSuffixes()
- Get application-specific suffixes to use with template paths. This allows you to look for view template overrides based on the application version.
Return a user object.
JUser
getUser
([
integer $id =
null])
-
integer
$id: The user ID to load. Skip or use null to retrieve the object for the currently logged in user.
Redefinition of:
- FOFPlatform::getUser()
- Returns the JUser object for the current user
Implementation of:
- FOFPlatformInterface::getUser()
- Returns a user object.
This method will try retrieving a variable from the request (input) data.
mixed
getUserStateFromRequest
(
string $key,
string $request,
FOFInput $input, [
mixed $default =
null], [
string $type =
'none'], [
boolean $setUserState =
true])
-
string
$key: The user state key for the variable
-
string
$request: The request variable name for the variable
-
FOFInput
$input: The FOFInput object with the request (input) data
-
mixed
$default: The default value. Default: null
-
string
$type: The filter type for the variable data. Default: none (no filtering)
-
boolean
$setUserState: Should I set the user state with the fetched value?
Redefinition of:
- FOFPlatform::getUserStateFromRequest()
- This method will try retrieving a variable from the request (input) data.
Implementation of:
- FOFPlatformInterface::getUserStateFromRequest()
- This method will try retrieving a variable from the request (input) data.
Return a list of the view template paths for this component.
array
getViewTemplatePaths
(string $component, string $view, [string $layout = 'default'], [string $tpl = null], [boolean $strict = false])
-
string
$component: The name of the component. For Joomla! this is something like "com_example"
-
string
$view: The name of the view you're looking a template for
-
string
$layout: The layout name to load, e.g. 'default'
-
string
$tpl: The sub-template name to load (null by default)
-
boolean
$strict: If true, only the specified layout will be searched for. Otherwise we'll fall back to the 'default' layout if the specified layout is not found.
Redefinition of:
- FOFPlatform::getViewTemplatePaths()
- Return a list of the view template directories for this component.
Implementation of:
- FOFPlatformInterface::getViewTemplatePaths()
- Return a list of the view template paths for this component. The paths are in the format site:/component_name/view_name/layout_name or admin:/component_name/view_name/layout_name
Load plugins of a specific type. Obviously this seems to only be required in the Joomla! CMS.
void
importPlugin
(string $type)
-
string
$type: The type of the plugins to be loaded
Redefinition of:
- FOFPlatform::importPlugin()
- Load plugins of a specific type. Obviously this seems to only be required in the Joomla! CMS.
Implementation of:
- FOFPlatformInterface::importPlugin()
- Load plugins of a specific type. Obviously this seems to only be required in the Joomla! CMS.
Is this a component running in a CLI application?
boolean
isCli
()
Redefinition of:
- FOFPlatform::isCli()
- Is this a component running in a CLI application?
Implementation of:
- FOFPlatformInterface::isCli()
- Is this a component running in a CLI application?
Main function to detect if we're running in a CLI environment and we're admin
array
isCliAdmin
()
Load the translation files for a given component.
void
loadTranslations
(string $component)
-
string
$component: The name of the component. For Joomla! this is something like "com_example"
Redefinition of:
- FOFPlatform::loadTranslations()
- Load the translation files for a given component.
Implementation of:
- FOFPlatformInterface::loadTranslations()
- Load the translation files for a given component. The "component" is used in the sense of what we call "component" in Joomla!, "plugin" in WordPress and "module" in Drupal, i.e. an application which is running inside our main application (CMS).
Execute plugins (system-level triggers) and fetch back an array with their return values.
array
runPlugins
(string $event, array $data)
-
string
$event: The event (trigger) name, e.g. onBeforeScratchMyEar
-
array
$data: A hash array of data sent to the plugins as part of the trigger
Redefinition of:
- FOFPlatform::runPlugins()
- Execute plugins (system-level triggers) and fetch back an array with their return values.
Implementation of:
- FOFPlatformInterface::runPlugins()
- Execute plugins (system-level triggers) and fetch back an array with their return values.
Saves something to the cache. This is supposed to be used for system-wide FOF data, not application data.
boolean
setCache
(string $key, string $content)
-
string
$key: The key of the data to save
-
string
$content: The actual data to save
Redefinition of:
- FOFPlatform::setCache()
- Saves something to the cache. This is supposed to be used for system-wide FOF data, not application data.
Implementation of:
- FOFPlatformInterface::setCache()
- Saves something to the cache. This is supposed to be used for system-wide FOF data, not application data.
Is AJAX re-ordering supported? This is 100% Joomla!-CMS specific. All other platforms should return false and never ask why.
boolean
supportsAjaxOrdering
()
Redefinition of:
- FOFPlatform::supportsAjaxOrdering()
- Is AJAX re-ordering supported? This is 100% Joomla!-CMS specific. All other platforms should return false and never ask why.
Implementation of:
- FOFPlatformInterface::supportsAjaxOrdering()
- Is AJAX re-ordering supported? This is 100% Joomla!-CMS specific. All other platforms should return false and never ask why.
Inherited Methods
Inherited From FOFPlatform
FOFPlatform::authorise()
FOFPlatform::authorizeAdmin()
FOFPlatform::checkVersion()
FOFPlatform::clearCache()
FOFPlatform::forceInstance()
FOFPlatform::getCache()
FOFPlatform::getComponentBaseDirs()
FOFPlatform::getDocument()
FOFPlatform::getInstance()
FOFPlatform::getOrdering()
FOFPlatform::getTemplateOverridePath()
FOFPlatform::getTemplateSuffixes()
FOFPlatform::getUser()
FOFPlatform::getUserStateFromRequest()
FOFPlatform::getViewTemplatePaths()
FOFPlatform::importPlugin()
FOFPlatform::isBackend()
FOFPlatform::isCli()
FOFPlatform::isEnabled()
FOFPlatform::isFrontend()
FOFPlatform::isGlobalFOFCacheEnabled()
FOFPlatform::loadTranslations()
FOFPlatform::loginUser()
FOFPlatform::logoutUser()
FOFPlatform::registerPlatformPath()
FOFPlatform::runPlugins()
FOFPlatform::setCache()
FOFPlatform::setErrorHandling()
FOFPlatform::supportsAjaxOrdering()
FOFPlatform::unregisterPlatformPath()