本文整理汇总了PHP中CMenu::run方法的典型用法代码示例。如果您正苦于以下问题:PHP CMenu::run方法的具体用法?PHP CMenu::run怎么用?PHP CMenu::run使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CMenu
的用法示例。
在下文中一共展示了CMenu::run方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: run
/**
* Run the widget
*/
public function run()
{
$this->publishAssets();
$this->registerClientScripts();
$this->registerCssFile($this->cssFile);
$htmlOptions['id'] = 'nav-container';
echo CHtml::openTag('div', $htmlOptions) . "\n";
$htmlOptions['id'] = 'nav-bar';
echo CHtml::openTag('div', $htmlOptions) . "\n";
parent::run();
echo CHtml::closeTag('div');
echo CHtml::closeTag('div');
}
示例2: run
public function run()
{
$items = $this->items;
foreach ($items as $item) {
$this->items = $item['items'];
if (count($this->items) == 0) {
continue;
}
echo '<div class="panel panel-default">
<a class="panel-heading collapsed" href="#smm-' . $item['id_object'] . '" data-toggle="collapse">' . $item['label'] . '</a>
<div id="smm-' . $item['id_object'] . '" class="collapse panel-collapse">';
parent::run();
echo '
</div>
</div>
';
}
}
示例3: run
function run()
{
if (array_key_exists('class', $this->htmlOptions)) {
$this->htmlOptions['class'] .= " sf-menu";
} else {
$this->htmlOptions['class'] = " sf-menu";
}
$cs = Yii::app()->getClientScript();
$id = $this->getId();
$assets = Yii::app()->getAssetManager()->publish(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'assets');
$cs->registerCssFile($assets . '/css/superfish.css');
if ($this->vertical) {
$cs->registerCssFile($assets . '/css/superfish-vertical.css');
$this->htmlOptions['class'] .= " sf-vertical";
}
if ($this->navbar) {
$cs->registerCssFile($assets . '/css/superfish-navbar.css');
$this->htmlOptions['class'] .= " sf-navbar";
}
if ($this->hoverIntent) {
$cs->registerScriptFile($assets . '/js/hoverIntent.js');
}
$cs->registerScriptFile($assets . '/js/superfish.js');
$options = $this->makeOptions();
$js = "jQuery('#{$id}')";
if ($this->supersubs['enable']) {
$cs->registerScriptFile($assets . '/js/supersubs.js');
//make subpersubs options
$supersubsOptions = CJavaScript::encode($this->supersubs['options']);
$js .= ".supersubs({$supersubsOptions})";
}
$js .= ".superfish({$options});";
$cs->registerScript(__CLASS__ . '#' . $id, $js);
parent::run();
}
示例4: run
/**
* Run the widget
*/
public function run()
{
$this->publishAssets();
$this->registerClientScripts();
parent::run();
}
示例5: run
/**
* Menu running
*/
public function run()
{
return parent::run();
}
示例6: run
/**
* Run the widget.
*/
public function run()
{
$this->registerClientScripts();
$this->registerCssFile();
parent::run();
}
示例7: run
/**
* Run the widget
*/
public function run()
{
$this->publishAssets();
$this->registerClientScripts();
$this->registerCssFile($this->cssFile);
$htmlOptions['id'] = 'nav-container';
echo CHtml::openTag('div', $htmlOptions) . "\n";
$htmlOptions['id'] = 'nav-bar';
echo CHtml::openTag('div', $htmlOptions) . "\n";
parent::run();
$q = isset($_GET['q']) ? $_GET['q'] : '';
echo CHtml::textField('q', $q, array('class' => 'input-small search-query pull-right', 'placeholder' => 'Pesquisa', 'id' => 'sq'));
echo CHtml::closeTag('div');
echo CHtml::closeTag('div');
}
示例8: run
public function run()
{
if ($this->baseTemplate == null) {
parent::run();
} else {
ob_start();
ob_implicit_flush(false);
parent::run();
echo strtr($this->baseTemplate, array('{menu}' => ob_get_clean()));
}
}
示例9: run
public function run()
{
parent::run();
}
示例10: run
public function run()
{
parent::run();
echo EBootstrap::closeTag('div');
}
示例11: run
/**
* Runs the menu widget.
*/
public function run()
{
parent::run();
$id = $this->getId();
Yii::app()->clientScript->registerScript(__CLASS__ . '#' . $id, "\r\n\t\t\tjQuery('#{$id} .dropdown-toggle').bind('click', function() {\r\n\t\t\t\t\$(this).parent().toggleClass('open');\r\n\t\t\t});\r\n\t\t");
}