Joomla CMS
3.10.11 (avec JPlatform 13.1 inclus)
Documentation des API du CMS Joomla en version 3.10.11 et du framework Joomla Platform intégré
|
Fonctions membres publiques statiques | |
static | registerPlatformPath ($path) |
static | unregisterPlatformPath ($path) |
static | forceInstance ($instance) |
static | getInstance () |
Champs de données | |
$ordering = 100 | |
$name = '' | |
$humanReadableName = 'Unknown Platform' | |
$version = '' | |
Attributs protégés | |
$isEnabled = null | |
$objectCache = array() | |
Attributs protégés statiques | |
static | $paths = array() |
static | $instance = null |
authorise | ( | $action, | |
$assetname | |||
) |
Perform an ACL check.
string | $action | The ACL privilege to check, e.g. core.edit |
string | $assetname | The asset name to check, typically the component's name |
Implémente FOFPlatformInterface.
authorizeAdmin | ( | $component | ) |
Authorise access to the component in the back-end.
string | $component | The name of the component. |
Implémente FOFPlatformInterface.
checkVersion | ( | $version1, | |
$version2, | |||
$operator | |||
) |
Performs a check between two versions. Use this function instead of PHP version_compare so we can mock it while testing
string | $version1 | First version number |
string | $version2 | Second version number |
string | $operator | Operator (see version_compare for valid operators) |
Implémente FOFPlatformInterface.
clearCache | ( | ) |
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.
Implémente FOFPlatformInterface.
|
static |
Force a specific platform object to be used. If null, nukes the cache
FOFPlatformInterface | null | $instance | The Platform object to be used |
getCache | ( | $key, | |
$default = null |
|||
) |
Retrieves data from the cache. This is supposed to be used for system-side FOF data, not application data.
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 |
Implémente FOFPlatformInterface.
getComponentBaseDirs | ( | $component | ) |
Returns the base (root) directories for a given component.
string | $component | The name of the component. For Joomla! this is something like "com_example" |
Implémente FOFPlatformInterface.
getDocument | ( | ) |
Returns the JDocument object which handles this component's response.
Implémente FOFPlatformInterface.
Références null.
|
static |
Find and return the most relevant platform object
Référencé par FOFInput\__callStatic(), FOFViewRaw\__construct(), FOFDatabaseInstaller\__construct(), FOFUtilsFilescheck\__construct(), FOFUtilsUpdate\__construct(), FOFToolbar\__construct(), FOFView\__construct(), FOFController\__construct(), FOFTable\__construct(), FOFModel\__construct(), FOFUtilsInstallscript\_applyPostInstallationMessages(), FOFController\_createModel(), FOFController\_createView(), FOFController\_csrfProtection(), FOFUtilsInstallscript\_reallyPublishAdminMenuItems(), FOFViewJson\_removeURIBase(), FOFView\_setPath(), FOFTemplateUtils\addCSS(), FOFModel\addIncludePath(), FOFTemplateUtils\addJS(), FOFTemplateUtils\addLESS(), FOFController\addPath(), FOFUtilsInstallscript\addPostInstallationMessage(), FOFModel\applyAccessFiltering(), FOFController\applySave(), FOFView\assign(), FOFView\assignRef(), FOFController\authorise(), FOFAutoloaderComponent\autoload_fof_controller(), FOFAutoloaderComponent\autoload_fof_field(), FOFAutoloaderComponent\autoload_fof_helper(), FOFAutoloaderComponent\autoload_fof_model(), FOFAutoloaderComponent\autoload_fof_table(), FOFAutoloaderComponent\autoload_fof_toolbar(), FOFAutoloaderComponent\autoload_fof_view(), FOFUtilsInstallscript\bugfixCantBuildAdminMenus(), FOFUtilsInstallscript\bugfixDBFunctionReturnedNoError(), FOFController\checkACL(), FOFTable\checkout(), FOFModel\checkout(), FOFModel\cleanCache(), FOFLess\compileFile(), FOFController\copy(), FOFController\createView(), FOFDispatcher\dispatch(), FOFViewForm\display(), FOFView\display(), FOFController\display(), FOFModelField\exact(), FOFController\execute(), FOFLess\fileExists(), FOFModel\findFormFilename(), FOFView\findRenderer(), FOFUtilsUpdate\findUpdatesJoomla(), FOFTemplateUtils\getAltPaths(), FOFToolbar\getAnInstance(), FOFModel\getAnInstance(), FOFTable\getAnInstance(), FOFFormFieldCalendar\getCalendar(), FOFUtilsUpdate\getCommonParameter(), FOFConfigProvider\getDomains(), FOFModelField\getField(), FOFFormHeaderFielddate\getFilter(), FOFFormFieldRules\getInput25(), FOFFormFieldRules\getInput3x(), FOFController\getItemidURLSuffix(), FOFController\getModel(), FOFToolbar\getMyViews(), FOFQueryAbstract\getNew(), FOFFormHeaderFieldselectable\getOptions(), FOFFormHeaderFieldsql\getOptions(), FOFFormHeaderAccesslevel\getOptions(), FOFFormFieldTag\getOptions(), FOFFormFieldComponents\getOptions(), FOFFormFieldList\getOptions(), FOFLayoutFile\getPath(), FOFFormFieldOrdering\getQuery(), FOFFormFieldUsergroup\getRepeatable(), FOFFormFieldAccesslevel\getRepeatable(), FOFFormFieldUser\getRepeatable(), FOFFormFieldAccesslevel\getStatic(), FOFFormFieldUsergroup\getStatic(), FOFFormFieldMedia\getStatic(), FOFFormFieldImagelist\getStatic(), FOFModel\getTable(), FOFTable\getTableFields(), FOFDispatcher\getTask(), FOFController\getThisView(), FOFDispatcher\getTmpInstance(), FOFController\getTmpInstance(), UsersModelProfile\getTwofactorform(), UsersModelUser\getTwofactorform(), UsersHelper\getTwoFactorMethods(), FOFUtilsUpdate\getUpdateSiteIds(), FOFModel\getUserStateFromRequest(), FOFUtilsInstallscript\installSubextensions(), FOFDispatcher\isCliAdmin(), FOFAutoloaderComponent\isFOFComponent(), UsersModelUser\isValidSecretKey(), FOFView\loadAnyTemplate(), FOFFormHelper\loadClass(), FOFUtilsConfigHelper\loadComponentConfig(), FOFModel\loadForm(), FOFView\loadHelper(), FOFTemplateUtils\loadPosition(), FOFView\loadTemplate(), FOFRenderStrapper\loadValidationScript(), FOFRenderJoomla\loadValidationScript(), FOFToolbar\onAdd(), FOFModelBehaviorPrivate\onAfterBuildQuery(), FOFModelBehaviorEnabled\onAfterBuildQuery(), FOFModelBehaviorAccess\onAfterBuildQuery(), FOFModelBehaviorLanguage\onAfterBuildQuery(), FOFModel\onAfterDelete(), FOFDispatcher\onAfterDispatch(), FOFModelBehaviorAccess\onAfterGetItem(), FOFModelBehaviorPrivate\onAfterGetItem(), FOFModelBehaviorLanguage\onAfterGetItem(), FOFModel\onAfterSave(), FOFModelBehaviorLanguage\onBeforeBuildQuery(), FOFModel\onBeforeDelete(), FOFDispatcher\onBeforeDispatchCLI(), FOFModel\onBeforeSave(), FOFToolbar\onBrowse(), FOFToolbar\onCpanelsBrowse(), FOFViewJson\onDisplay(), FOFViewCsv\onDisplay(), FOFViewRaw\onDisplay(), FOFViewRaw\onEdit(), FOFToolbar\onEdit(), FOFViewJson\onRead(), FOFToolbar\onRead(), PlgTwofactorauthYubikey\onUserTwofactorShowConfiguration(), PlgTwofactorauthTotp\onUserTwofactorShowConfiguration(), FOFConfigProvider\parseComponent(), FOFConfigProvider\parseComponentArea(), FOFTemplateUtils\parsePath(), FOFUtilsInstallscript\postflight(), FOFRenderJoomla3\postRender(), FOFRenderJoomla\postRender(), FOFRenderStrapper\postRender(), FOFModel\preprocessForm(), FOFRenderJoomla3\preRender(), FOFRenderStrapper\preRender(), FOFRenderJoomla\preRender(), FOFViewHtml\preRender(), FOFModel\publish(), FOFRenderStrapper\renderButtons(), FOFRenderJoomla\renderButtons(), FOFRenderAbstract\renderCategoryLinkbar(), FOFRenderStrapper\renderFieldsetLabel(), FOFRenderJoomla\renderFormBrowse(), FOFRenderStrapper\renderFormBrowse(), FOFRenderJoomla\renderFormEdit(), FOFRenderStrapper\renderFormEdit(), FOFToolbar\renderFromConfig(), FOFRenderJoomla\renderLinkbar(), FOFRenderStrapper\renderLinkbar_classic(), FOFRenderStrapper\renderLinkbar_joomla(), AdminModelProfile\save(), UsersModelUser\save(), UsersModelProfile\save(), FOFUtilsUpdate\setCommonParameter(), FOFView\setEscape(), FOFModel\setId(), FOFController\setRedirect(), FOFInput\setVar(), FOFFormFieldComponents\translate(), FOFDispatcher\transparentAuthentication(), FOFUtilsInstallscript\uninstallObsoleteSubextensions(), FOFUtilsInstallscript\uninstallPostInstallationMessages(), FOFUtilsInstallscript\uninstallSubextensions(), et FOFUtilsUpdate\updateComponent().
getIntegrationObject | ( | $key | ) |
Returns a platform integration object
string | $key | The key name of the platform integration object, e.g. 'filesystem' |
Implémente FOFPlatformInterface.
Références $className, et $key.
getOrdering | ( | ) |
Returns the ordering of the platform class.
Implémente FOFPlatformInterface.
Références $ordering.
getPlatformHumanName | ( | ) |
Returns the human readable platform name, e.g. "Joomla!", "Joomla! Framework", "Something Something Something Framework" etc.
Implémente FOFPlatformInterface.
getPlatformName | ( | ) |
Returns the (internal) name of the platform implementation, e.g. "joomla", "foobar123" etc. This MUST be the last part of the platform class name. For example, if you have a platform implementation class FOFPlatformFoobar you MUST return "foobar" (all lowercase).
Implémente FOFPlatformInterface.
Références $name.
getPlatformVersion | ( | ) |
Returns the version number string of the platform, e.g. "4.5.6". If implementation integrates with a CMS or a versioned foundation (e.g. a framework) it is advisable to return that version.
Implémente FOFPlatformInterface.
Références $version.
getTemplateOverridePath | ( | $component, | |
$absolute = true |
|||
) |
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 directories. If the application does not have such a thing as template overrides return an empty string.
string | $component | The name of the component for which to fetch the overrides |
boolean | $absolute | Should I return an absolute or relative path? |
Implémente 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.
Implémente FOFPlatformInterface.
getUser | ( | $id = null | ) |
Returns the JUser object for the current user
integer | $id | The ID of the user to fetch |
Implémente FOFPlatformInterface.
Références null.
getUserStateFromRequest | ( | $key, | |
$request, | |||
$input, | |||
$default = null , |
|||
$type = 'none' , |
|||
$setUserState = true |
|||
) |
This method will try retrieving a variable from the request (input) data.
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? |
Implémente FOFPlatformInterface.
Return a list of the view template directories for this component.
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. |
Implémente FOFPlatformInterface.
importPlugin | ( | $type | ) |
Load plugins of a specific type. Obviously this seems to only be required in the Joomla! CMS.
string | $type | The type of the plugins to be loaded |
Implémente FOFPlatformInterface.
isBackend | ( | ) |
Is this the administrative section of the component?
Implémente FOFPlatformInterface.
isCli | ( | ) |
Is this a component running in a CLI application?
Implémente FOFPlatformInterface.
isEnabled | ( | ) |
Is this platform enabled?
Implémente FOFPlatformInterface.
isFrontend | ( | ) |
Is this the public section of the component?
Implémente FOFPlatformInterface.
isGlobalFOFCacheEnabled | ( | ) |
loadTranslations | ( | $component | ) |
Load the translation files for a given component.
string | $component | The name of the component. For Joomla! this is something like "com_example" |
Implémente FOFPlatformInterface.
Références null.
logDeprecated | ( | $message | ) |
Logs a deprecated practice. In Joomla! this results in the $message being output in the deprecated log file, found in your site's log directory.
$message | The deprecated practice log message |
Implémente FOFPlatformInterface.
loginUser | ( | $authInfo | ) |
logs in a user
array | $authInfo | authentication information |
Implémente FOFPlatformInterface.
logoutUser | ( | ) |
|
static |
runPlugins | ( | $event, | |
$data | |||
) |
Execute plugins (system-level triggers) and fetch back an array with their return values.
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 |
Implémente FOFPlatformInterface.
setCache | ( | $key, | |
$content | |||
) |
Saves something to the cache. This is supposed to be used for system-wide FOF data, not application data.
string | $key | The key of the data to save |
string | $content | The actual data to save |
Implémente FOFPlatformInterface.
setErrorHandling | ( | $level, | |
$log_level, | |||
$options = array() |
|||
) |
Set the error Handling, if possible
integer | $level | PHP error level (E_ALL) |
string | $log_level | What to do with the error (ignore, callback) |
array | $options | Options for the error handler |
Implémente FOFPlatformInterface.
Références $options, et JError\setErrorHandling().
setIntegrationObject | ( | $key, | |
$object | |||
) |
Forces a platform integration object instance
string | $key | The key name of the platform integration object, e.g. 'filesystem' |
object | $object | The object to force for this key |
Implémente FOFPlatformInterface.
Références $key.
supportsAjaxOrdering | ( | ) |
Is AJAX re-ordering supported? This is 100% Joomla!-CMS specific. All other platforms should return false and never ask why.
Implémente FOFPlatformInterface.
|
static |
$humanReadableName = 'Unknown Platform' |
|
staticprotected |
$name = '' |
|
protected |
$ordering = 100 |
|
staticprotected |
$version = '' |