本文整理汇总了PHP中Tienda::loadJQuery方法的典型用法代码示例。如果您正苦于以下问题:PHP Tienda::loadJQuery方法的具体用法?PHP Tienda::loadJQuery怎么用?PHP Tienda::loadJQuery使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tienda
的用法示例。
在下文中一共展示了Tienda::loadJQuery方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
/**
*
* Method to display list of export types
*/
function display()
{
//needed to make display function correctly
JHTML::_('stylesheet', 'admin.css', 'media/com_tienda/css/');
JHTML::_('script', 'tienda.js', 'media/com_tienda/js/');
Tienda::loadJQuery();
require_once JPATH_SITE . '/libraries/joomla/html/html/select.php';
JToolBarHelper::title(JText::_('COM_TIENDA_GENERIC_EXPORT'));
$bar = JToolBar::getInstance('toolbar');
$btnhtml = '<a class="toolbar" onclick="javascript: document.adminForm.submit();" href="#">';
$btnhtml .= '<span title="Submit" class="icon-32-forward">';
$btnhtml .= '</span>' . JText::_('COM_TIENDA_SUBMIT') . '</a>';
$bar->appendButton('Custom', $btnhtml);
//read the type files inside the /plugins/tienda/genericexporter/models
jimport('joomla.filesystem.file');
if (version_compare(JVERSION, '1.6.0', 'ge')) {
// Joomla! 1.6+ code here
$folder = JPATH_SITE . '/plugins/tienda/genericexporter/genericexporter/models';
} else {
// Joomla! 1.5 code here
$folder = JPATH_SITE . '/plugins/tienda/genericexporter/models';
}
if (JFolder::exists($folder)) {
$extensions = array('php');
$exclusions = array('_base.php');
$files = JFolder::files($folder);
foreach ($files as $file) {
$namebits = explode('.', $file);
$extension = $namebits[count($namebits) - 1];
if (in_array($extension, $extensions) && !in_array($file, $exclusions)) {
$classname = 'TiendaGenericExporterModel' . ucfirst($namebits[0]);
if (version_compare(JVERSION, '1.6.0', 'ge')) {
// Joomla! 1.6+ code here
Tienda::load($classname, 'genericexporter.genericexporter.models.' . $namebits[0], array('site' => 'site', 'type' => 'plugins', 'ext' => 'tienda'));
} else {
// Joomla! 1.5 code here
Tienda::load($classname, 'genericexporter.models.' . $namebits[0], array('site' => 'site', 'type' => 'plugins', 'ext' => 'tienda'));
}
if (class_exists($classname)) {
$exporter = new $classname();
$models[] = array($exporter->getModelClass(), $exporter->getName());
}
}
}
}
if (version_compare(JVERSION, '1.6.0', 'ge')) {
// Joomla! 1.6+ code here
$folderTypes = JPATH_SITE . '/plugins/tienda/genericexporter/genericexporter/types';
} else {
// Joomla! 1.5 code here
$folderTypes = JPATH_SITE . '/plugins/tienda/genericexporter/types';
}
if (JFolder::exists($folderTypes)) {
$extensions = array('php');
$exclusions = array('_base.php');
$typeFiles = JFolder::files($folderTypes);
foreach ($typeFiles as $typeFile) {
$namebits = explode('.', $typeFile);
$extension = $namebits[count($namebits) - 1];
if (in_array($extension, $extensions) && !in_array($typeFile, $exclusions)) {
$classname = 'TiendaGenericExporterType' . $namebits[0];
if (version_compare(JVERSION, '1.6.0', 'ge')) {
// Joomla! 1.6+ code here
Tienda::load($classname, 'genericexporter.genericexporter.types.' . strtolower($namebits[0]), array('site' => 'site', 'type' => 'plugins', 'ext' => 'tienda'));
} else {
// Joomla! 1.5 code here
Tienda::load($classname, 'genericexporter.types.' . strtolower($namebits[0]), array('site' => 'site', 'type' => 'plugins', 'ext' => 'tienda'));
}
if (class_exists($classname)) {
$exporterType = new $classname();
$types[] = $exporterType->getFormat();
}
}
}
}
sort($models);
sort($types);
$vars = new JObject();
$vars->models = $models;
$vars->types = $types;
$html = $this->_getLayout('default', $vars);
return $html;
}