本文整理汇总了PHP中BsHtml::closeTag方法的典型用法代码示例。如果您正苦于以下问题:PHP BsHtml::closeTag方法的具体用法?PHP BsHtml::closeTag怎么用?PHP BsHtml::closeTag使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BsHtml
的用法示例。
在下文中一共展示了BsHtml::closeTag方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: run
public function run()
{
$type = $this->type;
echo BsHtml::openTag('div', array('id' => $this->id));
/*** Nav tabs ***/
echo BsHtml::$type($this->_labels);
/*** Tab panes ***/
echo BsHtml::openTag('div', array('class' => 'tab-content'));
foreach ($this->_content as $content) {
$class = 'tab-pane' . ($content['active'] == true ? ' active' : '');
echo BsHtml::tag('div', array('class' => $class, 'id' => $content['id'], 'role' => 'tabpanel'), $content['content']);
}
echo BsHtml::closeTag('div');
echo BsHtml::closeTag('div');
/*** clientScript ***/
$cs = Yii::app()->getClientScript();
$navs = '
$("#' . $this->id . ' ul.nav a").on("click",function(e){
e.preventDefault();
$(this).tab("show");
})
';
$cs->registerScript("navs-" . $this->id, $navs);
}
示例2: array
<?php
$baseUrl = Yii::app()->baseUrl;
Yii::app()->getClientScript()->registerCssFile($baseUrl . '/css/bootstrap.cerulean.min.css')->registerCoreScript('jquery')->registerScriptFile($baseUrl . '/js/bootstrap.js', CClientScript::POS_END);
?>
<link rel="icon" type="image/png" href="<?php
echo $baseUrl;
?>
/images/favicon.png" />
<title><?php
echo CHtml::encode($this->pageTitle);
?>
</title>
</head>
<body>
<div class="container"> <?php
$this->widget('bootstrap.widgets.BsNavbar', array('collapse' => true, 'brandLabel' => BsHtml::icon(BsHtml::GLYPHICON_FIRE) . BsHtml::bold(' Modelo de Evaluación') . BsHtml::small(' Qualitatcorp'), 'brandUrl' => Yii::app()->homeUrl, 'items' => array(array('class' => 'bootstrap.widgets.BsNav', 'type' => 'navbar', 'activateParents' => true, 'items' => array(array('label' => 'Evaluación', 'items' => array(BsHtml::menuHeader(BsHtml::italics('Evaluación')), array('label' => 'Administar Evaluación', 'url' => array('evaluacion/admin')), array('label' => 'Crear preguntas', 'url' => array('evaluacion/create')), BsHtml::menuHeader(BsHtml::italics('Evaluación Trabajador')), array('label' => 'Evaluar Trabajador', 'url' => array('evaluacion/evaluation')), array('label' => 'Resultados Trabajadores', 'url' => array('evaluacion/adminTRA')), BsHtml::menuHeader(BsHtml::italics('Preguntas')), array('label' => 'Administar preguntas', 'url' => array('evaluacion/adminPRE')), array('label' => 'Crear preguntas', 'url' => array('evaluacion/createPRE')), BsHtml::menuHeader(BsHtml::italics('Perfil Tecnico')), array('label' => 'Administar Perfil Tecnico', 'url' => array('evaluacion/adminPT')), array('label' => 'Crear Perfil Tecnico', 'url' => array('evaluacion/createPT')))), array('label' => 'Administración', 'items' => array(BsHtml::menuHeader(BsHtml::italics('Usuarios')), array('label' => 'Administar Usuarios', 'url' => array('usuario/admin')), array('label' => 'Crear Usuario', 'url' => array('usuario/create')), BsHtml::menuHeader(BsHtml::italics('Empresas')), array('label' => 'Administar Empresas', 'url' => array('empresa/admin')), array('label' => 'Crear Empresa', 'url' => array('empresa/create')), BsHtml::menuHeader(BsHtml::italics('Trabajadores')), array('label' => 'Administar Trabajadores', 'url' => array('trabajador/admin')), array('label' => 'Crear Trabajador', 'url' => array('trabajador/create')))))), array('class' => 'bootstrap.widgets.BsNav', 'type' => 'navbar', 'activateParents' => true, 'items' => array(array('label' => 'Login', 'url' => array('/site/login'), 'pull' => BsHtml::NAVBAR_NAV_PULL_RIGHT, 'visible' => Yii::app()->user->isGuest), array('label' => 'Logout (' . Yii::app()->user->name . ')', 'pull' => BsHtml::NAVBAR_NAV_PULL_RIGHT, 'url' => array('/site/logout'), 'visible' => !Yii::app()->user->isGuest)), 'htmlOptions' => array('pull' => BsHtml::NAVBAR_NAV_PULL_RIGHT)))));
?>
<?php
// breadcrumbs
$this->widget('bootstrap.widgets.BsBreadCrumb', array('links' => $this->breadcrumbs, 'tagName' => 'ul', 'activeLinkTemplate' => '<li><a href="{url}">{label}</a></li>', 'inactiveLinkTemplate' => '<li>{label}</li>', 'homeLink' => BsHtml::openTag('li') . BsHtml::icon(BsHtml::GLYPHICON_HOME) . BsHtml::closeTag('li')));
?>
<div class="content">
<?php
echo $content;
?>
</div>
</div>
</body>
</html>
示例3: run
/**
* Runs the widget.
*/
public function run()
{
echo BsHtml::closeTag($this->tagName);
$selector = '#' . $this->htmlOptions['id'];
$this->registerEvents($selector, $this->events);
}