API16

Difference between revisions of "JHtmlBehavior/framework"

From Joomla! Documentation

< API16:JHtmlBehavior
(New page: ===Description=== Method to load the mootools framework into the document head <span class="editsection" style="font-size:76%;"> <nowiki>[</nowiki>[[Description:JHtmlBehavior/framewor...)
 
m (removing red link to edit, no existant pages)
Line 3: Line 3:
  
 
<span class="editsection" style="font-size:76%;">
 
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>[[Description:JHtmlBehavior/framework|Edit Descripton]]<nowiki>]</nowiki>
+
<nowiki>[<! removed edit link to red link >]</nowiki>
 
</span>
 
</span>
  
{{Description:JHtmlBehavior/framework}}
+
<! removed transcluded page call, red link never existed >
  
 
===Syntax===
 
===Syntax===
Line 71: Line 71:
  
 
<span class="editsection" style="font-size:76%;">
 
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>[[SeeAlso:JHtmlBehavior/framework|Edit See Also]]<nowiki>]</nowiki>
+
<nowiki>[<! removed edit link to red link >]</nowiki>
 
</span>
 
</span>
{{SeeAlso:JHtmlBehavior/framework}}
+
<! removed transcluded page call, red link never existed >
  
 
===Examples===
 
===Examples===
Line 86: Line 86:
 
  format= ,,,
 
  format= ,,,
 
</dpl>
 
</dpl>
 +
[[Category:Archived pages API16]]

Revision as of 21:56, 13 May 2013

The "API16" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.

Description[edit]

Method to load the mootools framework into the document head

[<! removed edit link to red link >]

<! removed transcluded page call, red link never existed >

Syntax[edit]

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[edit]

void

Defined in[edit]

libraries/joomla/html/html/behavior.php

Importing[edit]

jimport( 'joomla.html.html.behavior' );

Source Body[edit]

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 edit link to red link >] <! removed transcluded page call, red link never existed >

Examples[edit]

<CodeExamplesForm />