本文整理汇总了PHP中JHtmlBootstrap::dropdown方法的典型用法代码示例。如果您正苦于以下问题:PHP JHtmlBootstrap::dropdown方法的具体用法?PHP JHtmlBootstrap::dropdown怎么用?PHP JHtmlBootstrap::dropdown使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JHtmlBootstrap
的用法示例。
在下文中一共展示了JHtmlBootstrap::dropdown方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testDropdown
/**
* Tests the dropdown method.
*
* @return void
*
* @since 3.1
*/
public function testDropdown()
{
// Initialise the dropdown script
JHtmlBootstrap::dropdown();
// Get the document instance
$document = JFactory::getDocument();
$this->assertArrayHasKey('/media/jui/js/bootstrap.min.js', $document->_scripts, 'Verify that the dropdown method initialises Bootstrap as well');
$this->assertEquals($document->_script['text/javascript'], "(function(\$){\n\t\t\t\t\$('.dropdown-toggle').dropdown();\n\t\t\t\t})(jQuery);", 'Verify that the dropdown script is initialised');
}
示例2: defined
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// no direct access
defined('_JEXEC') or die;
// Create a shortcut for params.
$params = $this->item->params;
$images = json_decode($this->item->images);
$canEdit = $this->item->params->get('access-edit');
$info = $params->get('info_block_position', 0);
$app = JFactory::getApplication();
$template = $app->getTemplate();
$jsnUtils = JSNTplUtils::getInstance();
JHtml::_('behavior.tooltip');
if ($jsnUtils->isJoomla3()) {
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers');
JHtmlBootstrap::dropdown('dropdown-toggle');
} else {
//JHtml::addIncludePath(JPATH_COMPONENT. DIRECTORY_SEPARATOR .'helpers');
JHtml::addIncludePath(JPATH_THEMES . DIRECTORY_SEPARATOR . $template . DIRECTORY_SEPARATOR . 'html' . DIRECTORY_SEPARATOR . 'com_content');
}
if ($jsnUtils->isJoomla3()) {
JHtml::_('behavior.framework');
?>
<?php
if ($this->item->state == 0 || strtotime($this->item->publish_up) > strtotime(JFactory::getDate()) || strtotime($this->item->publish_down) < strtotime(JFactory::getDate()) && $this->item->publish_down != '0000-00-00 00:00:00') {
?>
<div class="system-unpublished">
<?php
}
?>