本文整理汇总了PHP中TbHtml::tag方法的典型用法代码示例。如果您正苦于以下问题:PHP TbHtml::tag方法的具体用法?PHP TbHtml::tag怎么用?PHP TbHtml::tag使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TbHtml的用法示例。
在下文中一共展示了TbHtml::tag方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: renderButtons
/**
* Renders the buttons in this form.
* @return string the rendering result.
*/
public function renderButtons()
{
$buttons = array();
foreach ($this->getButtons() as $button) {
$buttons[] = $this->renderElement($button);
}
return !empty($buttons) ? TbHtml::tag('div', array('class' => 'form-actions'), implode("\n", $buttons)) : '';
}开发者ID:nicovicz,项目名称:reward-point,代码行数:12,代码来源:TbForm.php
示例2: renderElement
/**
* Renders a single element which could be an input element, a sub-form, a string, or a button.
* @param mixed $element the form element to be rendered.
* @return string the rendering result
*/
public function renderElement($element)
{
if (is_string($element)) {
if (($e = $this[$element]) === null && ($e = $this->getButtons()->itemAt($element)) === null) {
return $element;
} else {
$element = $e;
}
}
if ($element->getVisible()) {
if ($element instanceof CFormInputElement) {
if ($element->type === 'hidden') {
return TbHtml::tag('div', array('class' => 'hidden'), $element->render());
}
}
return $element->render();
}
return '';
}开发者ID:mfavetti,项目名称:LimeSurvey,代码行数:24,代码来源:TbForm.php
示例3: testTag
public function testTag()
{
$I = $this->codeGuy;
$html = TbHtml::tag('div', array('textAlign' => TbHtml::TEXT_ALIGN_RIGHT, 'pull' => TbHtml::PULL_RIGHT, 'span' => 3), 'Content');
$div = $I->createNode($html, 'div');
$I->seeNodeCssClass($div, 'pull-right span3 text-right');
}开发者ID:AlexanderGrant1,项目名称:AC41004,代码行数:7,代码来源:TbHtmlTest.php
示例4: normalizeTabs
/**
* Normalizes the tab configuration.
* @param array $tabs the tab configuration.
* @param array $panes a reference to the panes array.
* @param integer $i the running index.
* @return array the items.
*/
protected static function normalizeTabs($tabs, &$panes, $i = 0)
{
$menuItems = array();
foreach ($tabs as $tabOptions) {
if (isset($tabOptions['visible']) && $tabOptions['visible'] === false) {
continue;
}
$menuItem = array();
$menuItem['icon'] = self::popOption('icon', $tabOptions);
$menuItem['label'] = self::popOption('label', $tabOptions, '');
$menuItem['active'] = self::getOption('active', $tabOptions, false);
$menuItem['disabled'] = self::popOption('disabled', $tabOptions, false);
$menuItem['itemOptions'] = self::popOption('itemOptions', $tabOptions, array());
$menuItem['linkOptions'] = self::popOption('linkOptions', $tabOptions, array());
$items = self::popOption('items', $tabOptions, array());
if (!empty($items)) {
$menuItem['linkOptions']['data-toggle'] = 'dropdown';
$menuItem['items'] = self::normalizeTabs($items, $panes, $i);
} else {
$paneOptions = self::popOption('paneOptions', $tabOptions, array());
$id = $paneOptions['id'] = self::popOption('id', $tabOptions, 'tab_' . ++$i);
$menuItem['linkOptions']['data-toggle'] = 'tab';
$menuItem['url'] = '#' . $id;
$paneOptions = self::addClassName('tab-pane', $paneOptions);
if (self::popOption('fade', $tabOptions, true)) {
$paneOptions = self::addClassName('fade', $paneOptions);
}
if (self::popOption('active', $tabOptions, false)) {
$paneOptions = self::addClassName('active in', $paneOptions);
}
$paneContent = self::popOption('content', $tabOptions, '');
$panes[] = TbHtml::tag('div', $paneOptions, $paneContent);
}
$menuItems[] = $menuItem;
}
return $menuItems;
}开发者ID:jackycgq,项目名称:advanced,代码行数:44,代码来源:TbHtml.php
示例5: testHybridCol
public function testHybridCol()
{
$I = $this->codeGuy;
$html = TbHtml::tag('div', array('xs' => 12, 'md' => 8), 'Content');
$div = $I->createNode($html, 'div');
$I->seeNodeCssClass($div, array('col-xs-12', 'col-md-8'));
}开发者ID:noonnightcoder,项目名称:bakou-pos-apsara,代码行数:7,代码来源:TbHtmlTest.php
示例6: run
/**
* Runs the widget.
*/
public function run()
{
list($name, $id) = $this->resolveNameID();
$this->resolveId($id);
if ($this->hasModel()) {
$input = TbHtml::activeFileField($this->model, $this->attribute, $this->htmlOptions);
} else {
$input = TbHtml::fileField($name, $this->value, $this->htmlOptions);
}
echo TbHtml::tag('span', $this->buttonOptions, $this->label . ' ' . $input);
if ($this->assetPath !== false) {
$this->publishAssets($this->assetPath);
$this->registerCssFile('css/jquery.fileupload-ui.css');
if ($this->registerJs) {
$this->getClientScript()->registerCoreScript('jquery');
$this->registerScriptFile('js/vendor/jquery.ui.widget.js', CClientScript::POS_END);
$this->registerScriptFile('js/jquery.iframe-transport.js', CClientScript::POS_END);
$this->registerScriptFile('js/jquery.fileupload.js', CClientScript::POS_END);
}
}
if ($this->bindPlugin) {
TbArray::defaultValue('dataType', 'json', $this->pluginOptions);
$options = !empty($this->pluginOptions) ? CJavaScript::encode($this->pluginOptions) : '';
$script = findByPk(compact('EventoId', 'FuncionesId', 'ZonasId', 'SubzonaId'));
if (is_object($subzona)) {
//
if ($modo == "completo") {
// Se renderiza toda la pagina del editor
$this->render('editorSubzona', compact('subzona'));
} else {
//Sino solo se renderiza parcialmente la tabla con los lugares actualizados
$this->renderPartial('_subzona', compact('subzona'));
}
} else {
echo TbHtml::tag('strong', array(), 'No se encontraron subzonas.');
}
//throw new Exception("Error al procesar su petición, vefique integridad de parametros ", 3);
}开发者ID:cicb,项目名称:tpc,代码行数:18,代码来源:DistribucionesController.php
示例8: foreach
|