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 | addCSS ($path) |
static | addJS ($path, $defer=false, $async=false) |
static | addLESS ($path, $altPath=null, $returnPath=false) |
static | sefSort ($text, $field, $list) |
static | parsePath ($path, $localFile=false) |
static | getAltPaths ($path) |
static | loadPosition ($position, $style=-2) |
static | route ($route='') |
|
static |
Add a CSS file to the page generated by the CMS
string | $path | A fancy path definition understood by parsePath |
Références $document, $path, $url, et FOFPlatform\getInstance().
Référencé par FOFForm\loadCSSFiles().
Add a JS script file to the page generated by the CMS.
There are three combinations of defer and async (see http://www.w3schools.com/tags/att_script_defer.asp):
When you are using $defer = true there is no guarantee about the load order of the scripts. Whichever script loads first will be executed first. The order they appear on the page is completely irrelevant.
string | $path | A fancy path definition understood by parsePath |
boolean | $defer | Adds the defer attribute, meaning that your script will only load after the page has finished parsing. |
boolean | $async | Adds the async attribute, meaning that your script will be executed while the rest of the page continues parsing. |
Références $document, $path, $url, et FOFPlatform\getInstance().
Référencé par FOFForm\loadJSFiles().
Compile a LESS file into CSS and add it to the page generated by the CMS. This method has integrated cache support. The compiled LESS files will be written to the media/lib_fof/compiled directory of your site. If the file cannot be written we will use the $altPath, if specified
string | $path | A fancy path definition understood by parsePath pointing to the source LESS file |
string | $altPath | A fancy path definition understood by parsePath pointing to a precompiled CSS file, used when we can't write the generated file to the output directory |
boolean | $returnPath | Return the URL of the generated CSS file but do not include it. If it can't be generated, false is returned and the alt files are not included |
Références $document, $id, $path, $url, elseif, FOFPlatform\getInstance(), et null.
Référencé par FOFForm\loadCSSFiles().
|
static |
Parse a fancy path definition into a path relative to the site's root. It returns both the normal and alternative (template media override) path. For example, media://com_foobar/css/test.css is parsed into array( 'normal' => 'media/com_foobar/css/test.css', 'alternate' => 'templates/mytemplate/media/com_foobar/css//test.css' );
The valid protocols are: media:// The media directory or a media override admin:// Path relative to administrator directory (no alternate) site:// Path relative to site's root (no alternate)
string | $path | Fancy path |
Références $file, $path, $position, DIRECTORY_SEPARATOR, et FOFPlatform\getInstance().
|
static |
Returns the contents of a module position
string | $position | The position name, e.g. "position-1" |
int | $style | Rendering style; please refer to Joomla!'s code for more information |
Références $document, $mod, $params, $position, $renderer, $style, et FOFPlatform\getInstance().
|
static |
Parse a fancy path definition into a path relative to the site's root, respecting template overrides, suitable for inclusion of media files. For example, media://com_foobar/css/test.css is parsed into media/com_foobar/css/test.css if no override is found, or templates/mytemplate/media/com_foobar/css/test.css if the current template is called mytemplate and there's a media override for it.
The valid protocols are: media:// The media directory or a media override admin:// Path relative to administrator directory (no overrides) site:// Path relative to site's root (no overrides)
string | $path | Fancy path |
boolean | $localFile | When true, it returns the local path, not the URL |
Références $path, $url, DIRECTORY_SEPARATOR, elseif, FOFPlatform\getInstance(), et JDEBUG.
Référencé par PostinstallControllerMessage\action(), PostinstallModelMessages\addPostInstallationMessage(), FOFUtilsInstallscript\addPostInstallationMessage(), FOFFormHeaderFieldselectable\getOptions(), FOFFormFieldList\getOptions(), et PostinstallModelMessages\onProcessList().
|
static |
Merges the current url with new or changed parameters.
This method merges the route string with the url parameters defined in current url. The parameters defined in current url, but not given in route string, will automatically reused in the resulting url. But only these following parameters will be reused:
option, view, layout, format
Example:
Assuming that current url is: http://fobar.com/index.php?option=com_foo&view=cpanel
<?php echo FOFTemplateutils::route('view=categories&layout=tree'); ?>
Result: http://fobar.com/index.php?option=com_foo&view=categories&layout=tree
string | $route | The parameters string |
|
static |
Creates a SEF compatible sort header. Standard Joomla function will add a href="#" tag, so with SEF enabled, the browser will follow the fake link instead of processing the onSubmit event; so we need a fix.
string | $text | Header text |
string | $field | Field used for sorting |
FOFUtilsObject | $list | Object holding the direction and the ordering field |