当前位置: 首页>>代码示例>>PHP>>正文


PHP TbHtml::openTag方法代码示例

本文整理汇总了PHP中TbHtml::openTag方法的典型用法代码示例。如果您正苦于以下问题:PHP TbHtml::openTag方法的具体用法?PHP TbHtml::openTag怎么用?PHP TbHtml::openTag使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TbHtml的用法示例。


在下文中一共展示了TbHtml::openTag方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: run

 /**
  * Runs the widget.
  */
 public function run()
 {
     list($name, $id) = $this->resolveNameID();
     $id = $this->resolveId($id);
     echo TbHtml::openTag('div', array('class' => 'select2'));
     if ($this->hasModel()) {
         if ($this->asDropDownList) {
             echo TbHtml::activeDropDownList($this->model, $this->attribute, $this->data, $this->htmlOptions);
         } else {
             echo TbHtml::activeHiddenField($this->model, $this->attribute, $this->htmlOptions);
         }
     } else {
         if ($this->asDropDownList) {
             echo TbHtml::dropDownList($name, $this->value, $this->data, $this->htmlOptions);
         } else {
             echo TbHtml::hiddenField($name, $this->value, $this->htmlOptions);
         }
     }
     echo '</div>';
     if ($this->assetPath !== false) {
         $this->publishAssets($this->assetPath);
         $this->registerCssFile('/select2.css');
         if ($this->registerJs) {
             $this->registerScriptFile('/select2.js', CClientScript::POS_END);
         }
     }
     if ($this->bindPlugin) {
         $options = !empty($this->pluginOptions) ? CJavaScript::encode($this->pluginOptions) : '';
         $this->getClientScript()->registerScript(__CLASS__ . '#' . $id, "jQuery('#{$id}').select2({$options});");
     }
 }
开发者ID:juanprua,项目名称:yiistrap-widgets,代码行数:34,代码来源:TbSelect2.php

示例2: init

 /**
  * Initializes the widget.
  */
 public function init()
 {
     $this->attachBehavior('TbWidget', new TbWidget());
     $this->copyId();
     $this->htmlOptions['data-spy'] = 'affix';
     if (isset($this->offset)) {
         if (is_string($this->offset)) {
             $this->offset = array('top', $this->offset);
         }
         if (is_array($this->offset) && count($this->offset) === 2) {
             list($position, $offset) = $this->offset;
             $this->htmlOptions['data-offset-' . $position] = $offset;
         }
     }
     echo TbHtml::openTag($this->tagName, $this->htmlOptions);
 }
开发者ID:LumbaJack,项目名称:Mercado-BTX,代码行数:19,代码来源:TbAffix.php

示例3: renderField

 /**
  * Renders the field if no selector has been provided
  */
 public function renderField()
 {
     if (null === $this->selector) {
         $options = array();
         list($name, $id) = $this->resolveNameID();
         $options['id'] = $id . '_datetimepicker';
         TbHtml::addCssClass('input-append', $options);
         echo TbHtml::openTag('div', $options);
         if ($this->hasModel()) {
             echo TbHtml::activeTextField($this->model, $this->attribute, $this->htmlOptions);
         } else {
             echo TbHtml::textField($name, $this->value, $this->htmlOptions);
         }
         echo TbHtml::openTag('span', array('class' => 'add-on'));
         echo '<i data-time-icon="' . $this->iconTime . '" data-date-icon="' . $this->iconDate . '"></i>';
         echo TbHtml::closeTag('span');
         echo TbHtml::closeTag('div');
     }
 }
开发者ID:2amigos,项目名称:yiiwheels,代码行数:22,代码来源:WhDateTimePicker.php

示例4: renderField

 /**
  * Renders the field if no selector has been provided
  */
 public function renderField()
 {
     if (null === $this->selector) {
         $options = array();
         list($name, $id) = $this->resolveNameID();
         $options['id'] = $id . '_datetimepicker';
         TbHtml::addCssClass('input-group date form_datetime', $options);
         echo TbHtml::openTag('div', $options);
         if ($this->hasModel()) {
             echo TbHtml::activeTextField($this->model, $this->attribute, $this->htmlOptions);
         } else {
             echo TbHtml::textField($name, $this->value, $this->htmlOptions);
         }
         echo TbHtml::openTag('span', array('class' => 'input-group-addon'));
         echo '<i class="glyphicon glyphicon-th"' . '></i>';
         echo TbHtml::closeTag('span');
         echo TbHtml::closeTag('div');
     }
 }
开发者ID:reedboat,项目名称:yiiwheels,代码行数:22,代码来源:WhDateTimePicker.php

示例5: init

 /**
  * Initializes the widget.
  */
 public function init()
 {
     $this->attachBehavior('TbWidget', new TbWidget());
     $this->copyId();
     TbHtml::addCssClass('collapse', $this->htmlOptions);
     if (isset($this->parent)) {
         TbArray::defaultValue('data-parent', $this->parent, $this->htmlOptions);
     }
     if (isset($this->toggle) && $this->toggle) {
         TbHtml::addCssClass('in', $this->htmlOptions);
     }
     if (isset($this->view)) {
         $controller = $this->getController();
         if (isset($controller) && $controller->getViewFile($this->view) !== false) {
             $this->content = $this->controller->renderPartial($this->view, $this->viewData, true);
         }
     }
     echo TbHtml::openTag($this->tagName, $this->htmlOptions);
     echo $this->content;
 }
开发者ID:mfavetti,项目名称:LimeSurvey,代码行数:23,代码来源:TbCollapse.php

示例6: run

 /**
  * Runs the widget.
  */
 public function run()
 {
     /* @var $user CWebUser */
     $user = Yii::app()->getUser();
     if (count($user->getFlashes(false)) == 0) {
         return;
     }
     echo TbHtml::openTag('div', $this->htmlOptions);
     foreach ($this->alerts as $color => $alert) {
         if (isset($alert['visible']) && !$alert['visible']) {
             continue;
         }
         if ($user->hasFlash($color)) {
             $htmlOptions = TbArray::popValue('htmlOptions', $alert, array());
             TbArray::defaultValue('closeText', $this->closeText, $htmlOptions);
             TbArray::defaultValue('block', $this->block, $htmlOptions);
             TbArray::defaultValue('fade', $this->fade, $htmlOptions);
             echo TbHtml::alert($color, $user->getFlash($color), $htmlOptions);
         }
     }
     echo '</div>';
     $this->registerEvents("#{$this->htmlOptions['id']} > .alert", $this->events);
 }
开发者ID:LumbaJack,项目名称:Mercado-BTX,代码行数:26,代码来源:TbAlert.php

示例7: array

<?php 
echo TbHtml::openTag('tr');
foreach ($asientos as $asiento) {
    //Por cada Asiento
    echo TbHtml::tag('td', array(), $asiento->LugaresLug);
}
echo TbHtml::closeTag('tr');
开发者ID:cicb,项目名称:tpc,代码行数:7,代码来源:_filaAsiento.php

示例8: array

<div class="controles" style="height:100%;min-height:400px;">
		<h2><i class="fa fa-th"></i> Acerca del panel de control </h2>			
<br>

<?php 
echo TbHtml::openTag('div', array('class' => ' box box4  text-left'));
$this->beginWidget('CMarkdown', array('purifyOutput' => true));
try {
    $changelog = readfile("changelog");
} catch (Exception $e) {
    $changelog = "### Version 1.0 ";
}
$this->endWidget();
echo TbHtml::closeTag('div');
?>

</div>
开发者ID:cicb,项目名称:tpc,代码行数:17,代码来源:about.php

示例9: run

 /**
  * Runs the widget.
  */
 public function run()
 {
     $brand = $this->brandLabel !== false ? TbHtml::navbarBrandLink($this->brandLabel, $this->brandUrl, $this->brandOptions) : '';
     ob_start();
     foreach ($this->items as $item) {
         if (is_string($item)) {
             echo $item;
         } else {
             $widgetClassName = TbArray::popValue('class', $item);
             if ($widgetClassName !== null) {
                 $this->controller->widget($widgetClassName, $item);
             }
         }
     }
     $items = ob_get_clean();
     ob_start();
     if ($this->collapse !== false) {
         TbHtml::addCssClass('nav-collapse', $this->collapseOptions);
         ob_start();
         /* @var TbCollapse $collapseWidget */
         $collapseWidget = $this->controller->widget('bootstrap.widgets.TbCollapse', array('toggle' => false, 'content' => $items, 'htmlOptions' => $this->collapseOptions));
         $collapseContent = ob_get_clean();
         echo TbHtml::navbarCollapseLink('#' . $collapseWidget->getId());
         echo $brand . $collapseContent;
     } else {
         echo $brand . $items;
     }
     $containerContent = ob_get_clean();
     $containerOptions = TbArray::popValue('containerOptions', $this->htmlOptions, array());
     TbHtml::addCssClass($this->fluid ? 'container-fluid' : 'container', $containerOptions);
     ob_start();
     echo TbHtml::openTag('div', $containerOptions);
     echo $containerContent;
     echo '</div>';
     $content = ob_get_clean();
     echo TbHtml::navbar($content, $this->htmlOptions);
 }
开发者ID:AlexanderGrant1,项目名称:AC41004,代码行数:40,代码来源:TbNavbar.php

示例10: init

 /**
  * Widget's initialization method
  */
 public function init()
 {
     $this->attachBehavior('TbWidget', new TbWidget());
     TbArray::defaultValue('id', $this->getId(), $this->htmlOptions);
     TbArray::defaultValue('role', 'dialog', $this->htmlOptions);
     TbArray::defaultValue('tabindex', '-1', $this->htmlOptions);
     TbHtml::addCssClass('modal', $this->htmlOptions);
     if ($this->fade) {
         TbHtml::addCssClass('fade', $this->htmlOptions);
     }
     if (is_array($this->footer)) {
         $this->footer = implode('&nbsp;', $this->footer);
     }
     $this->initOptions();
     $this->initEvents();
     echo TbHtml::openTag('div', $this->htmlOptions) . PHP_EOL;
     echo TbHtml::openTag('div', array('class' => 'modal-dialog' . $this->size)) . PHP_EOL;
     echo TbHtml::openTag('div', array('class' => 'modal-content')) . PHP_EOL;
     echo TbHtml::modalHeader($this->header);
     if (!isset($this->content)) {
         ob_start();
     }
 }
开发者ID:mfavetti,项目名称:LimeSurvey,代码行数:26,代码来源:TbModal.php

示例11: testOpenTag

 public function testOpenTag()
 {
     $I = $this->codeGuy;
     $html = TbHtml::openTag('p', array('class' => 'tag'));
     $p = $I->createNode($html, 'p');
     $I->seeNodeCssClass($p, 'tag');
 }
开发者ID:AlexanderGrant1,项目名称:AC41004,代码行数:7,代码来源:TbHtmlTest.php

示例12: tabbable

 /**
  * Generates a tabbable menu.
  * @param string $type the menu type.
  * @param array $tabs the tab configurations.
  * @param array $htmlOptions additional HTML attributes.
  * @return string the generated menu.
  */
 public static function tabbable($type, $tabs, $htmlOptions = array())
 {
     $htmlOptions = self::addClassName('tabbable', $htmlOptions);
     $placement = self::popOption('placement', $htmlOptions);
     if (!empty($placement)) {
         $htmlOptions = self::addClassName('tabs-' . $placement, $htmlOptions);
     }
     $menuOptions = self::popOption('menuOptions', $htmlOptions, array());
     $contentOptions = self::popOption('contentOptions', $htmlOptions, array());
     $contentOptions = self::addClassName('tab-content', $contentOptions);
     $panes = array();
     $menu = TbHtml::nav($type, self::normalizeTabs($tabs, $panes), $menuOptions);
     $content = TbHtml::tag('div', $contentOptions, implode('', $panes));
     $output = TbHtml::openTag('div', $htmlOptions);
     $output .= $placement === self::TABS_PLACEMENT_BELOW ? $content . $menu : $menu . $content;
     $output .= '</div>';
     return $output;
 }
开发者ID:jackycgq,项目名称:advanced,代码行数:25,代码来源:TbHtml.php

示例13: renderTableRow

 /**
  * Renders a table body row.
  *
  * @param integer $row the row number (zero-based).
  */
 public function renderTableRow($row)
 {
     $htmlOptions = array();
     if ($this->rowHtmlOptionsExpression !== null) {
         $data = $this->dataProvider->data[$row];
         $options = $this->evaluateExpression($this->rowHtmlOptionsExpression, array('row' => $row, 'data' => $data));
         if (is_array($options)) {
             $htmlOptions = $options;
         }
     }
     if ($this->rowCssClassExpression !== null) {
         $data = $this->dataProvider->data[$row];
         $class = $this->evaluateExpression($this->rowCssClassExpression, array('row' => $row, 'data' => $data));
     } elseif (is_array($this->rowCssClass) && ($n = count($this->rowCssClass)) > 0) {
         $class = $this->rowCssClass[$row % $n];
     }
     if (!empty($class)) {
         if (isset($htmlOptions['class'])) {
             $htmlOptions['class'] .= ' ' . $class;
         } else {
             $htmlOptions['class'] = $class;
         }
     }
     echo TbHtml::openTag('tr', $htmlOptions);
     foreach ($this->columns as $column) {
         echo $this->displayExtendedSummary && !empty($this->extendedSummary['columns']) ? $this->parseColumnValue($column, $row) : $column->renderDataCell($row);
     }
     echo TbHtml::closeTag('tr');
 }
开发者ID:2amigos,项目名称:yiiwheels,代码行数:34,代码来源:WhGridView.php

示例14: tabbable

 /**
  * Generates a tabbable menu.
  * @param array $tabs the tab configurations.
  * @param array $htmlOptions additional HTML attributes.
  * @return string the generated menu.
  */
 public static function tabbable($tabs, $htmlOptions = array())
 {
     $htmlOptions = self::addClassName('tabbable', $htmlOptions);
     $placement = self::popOption('placement', $htmlOptions);
     if (!empty($placement)) {
         $htmlOptions = self::addClassName('tabs-' . $placement, $htmlOptions);
     }
     $menuOptions = self::popOption('menuOptions', $htmlOptions, array());
     $contentOptions = self::popOption('contentOptions', $htmlOptions, array());
     $contentOptions = self::addClassName('tab-content', $contentOptions);
     $menuItems = array();
     foreach ($tabs as $i => &$tabOptions) {
         $icon = self::popOption('icon', $tabOptions);
         $label = self::popOption('label', $tabOptions, '');
         $id = $tabOptions['id'] = self::popOption('id', $tabOptions, 'tab_' . ($i + 1));
         $active = self::getOption('active', $tabOptions, false);
         $disabled = self::popOption('disabled', $tabOptions, false);
         $linkOptions = self::popOption('linkOptions', $tabOptions, array());
         $linkOptions['data-toggle'] = 'tab';
         $itemOptions = self::popOption('itemOptions', $tabOptions, array());
         $items = self::popOption('items', $tabOptions, array());
         $menuItem = array('icon' => $icon, 'label' => $label, 'url' => '#' . $id, 'active' => $active, 'disabled' => $disabled, 'itemOptions' => $itemOptions, 'linkOptions' => $linkOptions, 'items' => $items);
         $menuItems[] = $menuItem;
     }
     ob_start();
     echo TbHtml::openTag('div', $htmlOptions);
     echo TbHtml::tabs($menuItems, $menuOptions);
     echo TbHtml::openTag('div', $contentOptions);
     foreach ($tabs as &$tabOptions) {
         if (self::popOption('active', $tabOptions, false)) {
             $tabOptions = self::addClassName('active', $tabOptions);
         }
         $tabContent = self::popOption('content', $tabOptions, '');
         $tabOptions = self::addClassName('tab-pane', $tabOptions);
         echo TbHtml::tag('div', $tabOptions, $tabContent);
     }
     echo '</div></div>';
     return ob_get_clean();
 }
开发者ID:ZK413,项目名称:yiimine,代码行数:45,代码来源:TbHtml.php

示例15: actionGenerarNumerados

 public function actionGenerarNumerados($EventoId, $FuncionesId, $ZonasId)
 {
     // Genera asientos numerados de una zona
     // Si le han pasado el id de zona
     $zona = Zonas::model()->findByPk(compact('EventoId', 'FuncionesId', 'ZonasId'));
     if ($zona->generarLugares()) {
         echo TbHtml::openTag('div', array('style' => 'color:#FFF'));
         echo TbHtml::tag('h2', array(), 'Se han generado los lugares.');
         echo TbHtml::tag('p', array(), 'Los lugares se han registrado conforme a la configuración que ústed acaba de definir.');
         echo "<br>";
         echo TbHtml::link(' Regresar a zonas', array('editorSubzona', 'EventoId' => $EventoId, 'FuncionesId' => $FuncionesId, 'ZonasId' => $ZonasId, 'SubzonaId' => 1), array('class' => 'btn btn-large btn-primary fa fa-arrow-left'));
         echo TbHtml::closeTag('div');
     }
 }
开发者ID:cicb,项目名称:tpc,代码行数:14,代码来源:DistribucionesController.php


注:本文中的TbHtml::openTag方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。