JHtmlBehavior/framework: Difference between revisions
From Joomla! Documentation
m removing red link to edit, no existant pages |
m clean up |
||
| Line 2: | Line 2: | ||
Method to load the mootools framework into the document head | Method to load the mootools framework into the document head | ||
<! removed transcluded page call, red link never existed > | <! removed transcluded page call, red link never existed > | ||
| Line 70: | Line 68: | ||
</source> | </source> | ||
<! removed transcluded page call, red link never existed > | <! removed transcluded page call, red link never existed > | ||
Revision as of 14:05, 24 March 2017
Description
Method to load the mootools framework into the document head
<! removed transcluded page call, red link never existed >
Syntax
static framework($extras=false, $debug=null)
| Parameter Name | Default Value | Description |
|---|---|---|
| $extras | false | $type Mootools file to load |
| $debug | null | $debug Is debugging mode on? [optional] |
Returns
void
Defined in
libraries/joomla/html/html/behavior.php
Importing
jimport( 'joomla.html.html.behavior' );
Source Body
public static function framework($extras = false, $debug = null)
{
static $loaded = array();
$type = $extras ? 'more' : 'core';
// Only load once
if (!empty($loaded[$type])) {
return;
}
JHtml::core($debug);
// If no debugging value is set, use the configuration setting
if ($debug === null)
{
$config = &JFactory::getConfig();
$debug = $config->getValue('config.debug');
}
// TODO NOTE: Here we are checking for Konqueror - If they fix thier issue with compressed, we will need to update this
$konkcheck = isset($_SERVER['HTTP_USER_AGENT']) ? strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'konqueror') : null;
$uncompressed = ($debug || $konkcheck) ? '-uncompressed' : '';
if ($type != 'core' && empty($loaded['core'])) {
self::framework(false);
}
JHTML::_('script','system/mootools-'.$type.$uncompressed.'.js', false, true);
$loaded[$type] = true;
return;
}
<! removed transcluded page call, red link never existed >
Examples
<CodeExamplesForm />