本文整理匯總了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
}
?>