Source for file jquery.php
Documentation is available at jquery.php
* @package Joomla.Libraries
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
* Utility class for jQuery JavaScript behaviors
* @package Joomla.Libraries
* @var array Array containing information for loaded files
protected static $loaded =
array();
* Method to load the jQuery JavaScript framework into the document head
* If debugging mode is on an uncompressed version of jQuery is included for easier debugging.
* @param boolean $noConflict True to load jQuery in noConflict mode [optional]
* @param mixed $debug Is debugging mode on? [optional]
* @param boolean $migrate True to enable the jQuery Migrate plugin
public static function framework($noConflict =
true, $debug =
null, $migrate =
true)
if (!empty(static::$loaded[__METHOD__
]))
// If no debugging value is set, use the configuration setting
$config =
JFactory::getConfig();
$debug = (boolean)
$config->get('debug');
JHtml::_('script', 'jui/jquery.min.js', false, true, false, false, $debug);
// Check if we are loading in noConflict
JHtml::_('script', 'jui/jquery-noconflict.js', false, true, false, false, false);
// Check if we are loading Migrate
JHtml::_('script', 'jui/jquery-migrate.min.js', false, true, false, false, $debug);
static::$loaded[__METHOD__
] =
true;
* Method to load the jQuery UI JavaScript framework into the document head
* If debugging mode is on an uncompressed version of jQuery UI is included for easier debugging.
* @param array $components The jQuery UI components to load [optional]
* @param mixed $debug Is debugging mode on? [optional]
public static function ui(array $components =
array('core'), $debug =
null)
// Set an array containing the supported jQuery UI components handled by this method
$supported =
array('core', 'sortable');
// If no debugging value is set, use the configuration setting
$debug = (boolean)
$config->get('debug');
// Load each of the requested components
foreach ($components as $component)
// Only attempt to load the component if it's supported in core and hasn't already been loaded
if (in_array($component, $supported) &&
empty(static::$loaded[__METHOD__
][$component]))
JHtml::_('script', 'jui/jquery.ui.' .
$component .
'.min.js', false, true, false, false, $debug);
static::$loaded[__METHOD__
][$component] =
true;
Documentation generated on Tue, 19 Nov 2013 15:06:15 +0100 by phpDocumentor 1.4.3