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


PHP N2Html::openTag方法代码示例

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


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

示例1: fetchElement

 function fetchElement()
 {
     $min = N2XmlHelper::getAttribute($this->_xml, 'min');
     if ($min == '') {
         $min = '-Number.MAX_VALUE';
     }
     $max = N2XmlHelper::getAttribute($this->_xml, 'max');
     if ($max == '') {
         $max = 'Number.MAX_VALUE';
     }
     N2JS::addInline('new NextendElementNumber("' . $this->_id . '", ' . $min . ', ' . $max . ');');
     $html = N2Html::openTag('div', array('class' => 'n2-form-element-text ' . $this->getClass() . ($this->_xml->unit ? 'n2-text-has-unit ' : '') . 'n2-border-radius', 'style' => $this->fieldType == 'hidden' ? 'display: none;' : ''));
     $subLabel = N2XmlHelper::getAttribute($this->_xml, 'sublabel');
     if ($subLabel) {
         $html .= N2Html::tag('div', array('class' => 'n2-text-sub-label n2-h5 n2-uc'), n2_($subLabel));
     }
     $html .= $this->pre();
     $html .= N2Html::tag('input', array('type' => $this->fieldType, 'id' => $this->_id, 'name' => $this->_inputname, 'value' => $this->_form->get($this->_name, $this->_default), 'class' => 'n2-h5', 'style' => $this->getStyle(), 'autocomplete' => 'off'), false);
     $html .= $this->post();
     if ($this->_xml->unit) {
         $html .= N2Html::tag('div', array('class' => 'n2-text-unit n2-h5 n2-uc'), n2_((string) $this->_xml->unit));
     }
     $html .= "</div>";
     return $html;
 }
开发者ID:vicpril,项目名称:rep_bidqa,代码行数:25,代码来源:number.php

示例2: generateOptions

 function generateOptions(&$xml)
 {
     $this->values = array();
     $html = '';
     foreach ($xml->option as $option) {
         $v = N2XmlHelper::getAttribute($option, 'value');
         $image = N2Uri::pathToUri($v);
         $selected = $this->isSelected($v);
         if ($v != -1) {
             $value = $this->parseValue($image);
             $this->values[] = $value;
             $html .= N2Html::openTag("div", array("class" => "n2-radio-option n2-imagelist-option" . ($selected ? ' n2-active' : '')));
             $ext = pathinfo($image, PATHINFO_EXTENSION);
             if ($ext == 'svg') {
                 $image = 'data:image/svg+xml;base64,' . base64_encode(N2Filesystem::readFile(N2Filesystem::getBasePath() . $v));
             }
             $html .= N2Html::image($image, (string) $option, array('data-image' => $value));
             $html .= N2Html::closeTag("div");
         } else {
             $this->values[] = -1;
             $html .= N2Html::tag("div", array("class" => "n2-radio-option" . ($selected ? ' n2-active' : '')), (string) $option);
         }
     }
     return $html;
 }
开发者ID:MBerguer,项目名称:wp-demo,代码行数:25,代码来源:imagelist.php

示例3: fetchElement

 function fetchElement()
 {
     $html = N2Html::openTag("div", array('class' => 'n2-imagelist n2-imagelistlabel', 'style' => N2XmlHelper::getAttribute($this->_xml, 'style')));
     $html .= parent::fetchElement();
     $html .= N2Html::closeTag('div');
     return $html;
 }
开发者ID:vicpril,项目名称:rep_bidqa,代码行数:7,代码来源:imagelistlabel.php

示例4: render

    function render($control_name)
    {
        $this->initTabs();
        $id = 'n2-form-matrix-' . $this->_name;
        $active = intval(N2XmlHelper::getAttribute($this->_xml, 'active'));
        $active = $active > 0 ? $active - 1 : 0;
        $underlined = N2XmlHelper::getAttribute($this->_xml, 'underlined');
        $classes = N2XmlHelper::getAttribute($this->_xml, 'classes');
        ?>

        <div id="<?php 
        echo $id;
        ?>
" class="n2-form-tab n2-form-matrix">
            <div
                class="n2-h2 n2-content-box-title-bg n2-form-matrix-views <?php 
        echo $classes;
        ?>
">
                <?php 
        $i = 0;
        $class = ($underlined ? 'n2-underline' : '') . ' n2-h4 n2-uc n2-has-underline n2-form-matrix-menu';
        foreach ($this->_tabs as $tabName => $tab) {
            echo N2Html::tag("div", array("class" => $class . ($i == $active ? ' n2-active' : '') . ' n2-fm-' . $tabName), N2Html::tag("span", array("class" => "n2-underline"), n2_(N2XmlHelper::getAttribute($tab->_xml, 'label'))));
            $i++;
        }
        ?>
            </div>

            <div class="n2-tabs">
                <?php 
        $i = 0;
        foreach ($this->_tabs as $tabName => $tab) {
            echo N2Html::openTag('div', array('class' => 'n2-form-matrix-pane' . ($i == $active ? ' n2-active' : '') . ' n2-fm-' . $tabName));
            $tab->render($control_name);
            echo N2Html::closeTag('div');
            $i++;
        }
        ?>
            </div>
        </div>

        <?php 
        N2JS::addInline('
            (function(){
                var matrix = $("#' . $id . '"),
                    views = matrix.find("> .n2-form-matrix-views > div"),
                    panes = matrix.find("> .n2-tabs > div");
                views.on("click", function(){
                    views.removeClass("n2-active");
                    panes.removeClass("n2-active");
                    var i = views.index(this);
                    views.eq(i).addClass("n2-active");
                    panes.eq(i).addClass("n2-active");
                });
            })()
        ');
        ?>
    <?php 
    }
开发者ID:MBerguer,项目名称:wp-demo,代码行数:60,代码来源:tabbed.php

示例5: getHtml

 private function getHtml($data, $id, $slider, $slide)
 {
     $font = N2FontRenderer::render($data->get('font'), 'link', $slider->elementId, 'div#' . $slider->elementId . ' ', $slider->fontSize);
     $html = N2Html::openTag("div", array("class" => "nextend-smartslider-button-container {$font}", "style" => "cursor: pointer; display:" . ($data->get('fullwidth', 0) ? 'block' : 'inline-block') . ";" . ($data->get('nowrap', 1) ? 'white-space:nowrap;' : '')));
     $style = N2StyleRenderer::render($data->get('style'), 'heading', $slider->elementId, 'div#' . $slider->elementId . ' ');
     $html .= $this->getLink($slide, $data, $slide->fill($data->get("content")), array("style" => "display:" . ($data->get('fullwidth', 0) ? 'block' : 'inline-block') . ";", "class" => "{$style} {$data->get('class', '')}"), true);
     $html .= N2Html::closeTag("div");
     return $html;
 }
开发者ID:vicpril,项目名称:rep_bidqa,代码行数:9,代码来源:button.php

示例6: getTemplate

 function getTemplate($slider)
 {
     $html = N2Html::openTag("div", array('class' => '{styleclass}', 'style' => 'overflow:hidden;'));
     $html .= N2Html::openTag("a", array("href" => "{url}", "onclick" => 'return false;', "class" => "n2-ow", "style" => "display: block;background: none !important;"));
     $html .= '<img class="n2-ow" src="{image}" style="display: inline-block; max-width: 100%;width:{width};height:{height};" class="{cssclass}">';
     $html .= N2Html::closeTag("a");
     $html .= N2Html::closeTag("div");
     return $html;
 }
开发者ID:MBerguer,项目名称:wp-demo,代码行数:9,代码来源:image.php

示例7: renderFontsConfigurationForm

 public function renderFontsConfigurationForm()
 {
     $values = N2Fonts::loadSettings();
     $form = new N2Form($this->appType);
     $form->loadArray($values);
     $form->loadArray($values['plugins']->toArray());
     $form->loadXMLFile(N2Loader::getPath('models', 'system') . '/forms/fonts.xml');
     echo N2Html::openTag("form", array("id" => "nextend-config", "method" => "post", "action" => N2Request::getRequestUri()));
     $form->render('fonts');
     echo N2Html::closeTag("form");
 }
开发者ID:vicpril,项目名称:rep_bidqa,代码行数:11,代码来源:_view.php

示例8: fetchElement

 function fetchElement()
 {
     $widgetTypes = $this->getOptions();
     $id = 'n2-form-matrix-' . $this->_id;
     $html = N2Html::openTag("div", array('id' => $id, "class" => "n2-form-matrix"));
     $value = $this->getValue();
     $test = false;
     foreach ($widgetTypes as $type => $v) {
         if ($value == $type) {
             $test = true;
             break;
         }
     }
     if (!$test) {
         $value = 'arrow';
     }
     $html .= N2Html::openTag('div', array('class' => 'n2-h2 n2-content-box-title-bg n2-form-matrix-views'));
     $class = 'n2-underline n2-h4 n2-uc n2-has-underline n2-form-matrix-menu';
     foreach ($widgetTypes as $type => $v) {
         $html .= N2Html::tag("div", array("onclick" => "n2('#{$this->_id}').val('{$type}');", "class" => $class . ($value == $type ? ' n2-active' : '')), N2Html::tag("span", array("class" => "n2-underline"), $v[0]));
     }
     $html .= N2Html::closeTag("div");
     $html .= N2Html::openTag("div", array("class" => "n2-tabs"));
     foreach ($widgetTypes as $type => $v) {
         $html .= N2Html::openTag('div', array('class' => 'n2-form-matrix-pane' . ($value == $type ? ' n2-active' : '')));
         $GLOBALS['nextendbuffer'] = '';
         $form = new N2Form($this->_form->appType);
         $form->_data =& $this->_form->_data;
         $form->loadXMLFile($v[1] . 'config.xml');
         ob_start();
         $form->render($this->control_name);
         $html .= ob_get_clean();
         $html .= $GLOBALS['nextendbuffer'];
         $html .= N2Html::closeTag("div");
     }
     $html .= N2Html::closeTag("div");
     $html .= N2Html::closeTag("div");
     N2JS::addInline('
         (function(){
             var matrix = $("#' . $id . '"),
                 views = matrix.find("> .n2-form-matrix-views > div"),
                 panes = matrix.find("> .n2-tabs > div");
             views.on("click", function(){
                 views.removeClass("n2-active");
                 panes.removeClass("n2-active");
                 var i = views.index(this);
                 views.eq(i).addClass("n2-active");
                 panes.eq(i).addClass("n2-active");
             });
         })()
     ');
     return $html . parent::fetchElement();
 }
开发者ID:RenatoToasa,项目名称:Pagina-Web,代码行数:53,代码来源:pluginmatrix.php

示例9: getDebugTrace

 /**
  * @param bool $error error message
  * @param int  $limit
  */
 public static function getDebugTrace($error = false, $limit = 5)
 {
     $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
     $outrace = array();
     if ($trace) {
         foreach ($trace as $k => $trow) {
             if ($k > 0 && $k <= $limit + 1) {
                 $outrace[] = $trow;
             }
         }
     }
     if ($error) {
         echo "<p><strong>{$error}</strong></p>";
     }
     echo N2Html::openTag("pre");
     print_r($outrace);
     echo N2Html::closeTag("pre");
     n2_exit(true);
 }
开发者ID:RenatoToasa,项目名称:Pagina-Web,代码行数:23,代码来源:system.php

示例10: fetchElement

 function fetchElement()
 {
     $items = array();
     N2Plugin::callPlugin('ssitem', 'onNextendSliderItemList', array(&$items));
     ob_start();
     ?>
     <div id="smartslider-slide-toolbox-item" class="nextend-clearfix smartslider-slide-toolbox-view">
         <?php 
     $itemModel = new N2SmartsliderItemModel();
     foreach ($items as $type => $item) {
         echo N2Html::openTag("div", array("id" => "smartslider-slide-toolbox-item-type-{$type}", "style" => "display:none", "data-itemtemplate" => $item[1], "data-itemvalues" => $item[3]));
         $itemModel->renderForm($type, $item);
         echo N2Html::closeTag("div");
     }
     ?>
     </div>
     <?php 
     return ob_get_clean();
 }
开发者ID:MBerguer,项目名称:wp-demo,代码行数:19,代码来源:items.php

示例11: generateOptions

 function generateOptions(&$xml)
 {
     $this->values = array();
     $html = '';
     foreach ($xml->option as $option) {
         $v = N2XmlHelper::getAttribute($option, 'value');
         $image = N2Uri::pathToUri($v);
         $selected = $this->isSelected($this->parseValue($v));
         if ($v != -1) {
             $this->values[] = $this->parseValue($image);
             $html .= N2Html::openTag("div", array("class" => "n2-radio-option n2-imagelist-option" . ($selected ? ' n2-active' : '')));
             $html .= N2Html::image($image, (string) $option);
             $html .= N2Html::closeTag("div");
         } else {
             $this->values[] = -1;
             $html .= N2Html::tag("div", array("class" => "n2-radio-option" . ($selected ? ' n2-active' : '')), (string) $option);
         }
     }
     return $html;
 }
开发者ID:vicpril,项目名称:rep_bidqa,代码行数:20,代码来源:imagelistfromfoldervalue.php

示例12: fetchElement

 function fetchElement()
 {
     $this->_values = explode('||', $this->getValue());
     if (!is_array($this->_values)) {
         $this->_values = array();
     }
     $this->_multiple = intval(N2XmlHelper::getAttribute($this->_xml, 'multiple'));
     $this->_translateable = intval(N2XmlHelper::getAttribute($this->_xml, 'translateable'));
     $size = N2XmlHelper::getAttribute($this->_xml, 'size');
     if ($size != '') {
         $size = " size='" . $size . "'";
     }
     $html = N2Html::openTag("div", array("class" => "n2-form-element-list", "style" => N2XmlHelper::getAttribute($this->_xml, 'style')));
     $html .= "<select id='" . $this->_id . "_select' name='select" . $this->_inputname . "' " . $size . $this->isMultiple() . "  autocomplete='off'>";
     $html .= $this->generateOptions($this->_xml);
     if ($this->_xml->optgroup) {
         $html .= $this->generateOptgroup($this->_xml);
     }
     $html .= "</select>";
     $html .= N2Html::closeTag("div");
     $html .= parent::fetchElement();
     N2JS::addInline('new NextendElementList("' . $this->_id . '", ' . $this->_multiple . ', "' . $this->getValue() . '");');
     return $html;
 }
开发者ID:vicpril,项目名称:rep_bidqa,代码行数:24,代码来源:list.php

示例13: array

            $dlRow['options'] = array();
        }
        echo N2Html::openTag('dt', $dlRow['options'] + array('class' => $dlRow['class']));
        if (isset($dlRow["linkOptions"])) {
            echo N2Html::tag('a', isset($dlRow['linkOptions']) ? $dlRow['linkOptions'] : array(), $dlRow['title']);
        } elseif (isset($dlRow["link"])) {
            echo N2Html::tag('a', array('href' => $dlRow['link']), $dlRow['title']);
        } else {
            echo N2Html::tag('div', array(), $dlRow['title']);
        }
        if (!empty($dlRow['actions'])) {
            echo N2Html::tag('span', array('class' => 'n2-actions'), $dlRow['actions']);
        }
        if (!empty($dlRow['after'])) {
            echo $dlRow['after'];
        }
        echo N2Html::closeTag('dt');
        echo N2Html::openTag('dd', array('class' => $dlRow['class']));
        if (!empty($dlRow["preUl"])) {
            echo $dlRow["preUl"];
        }
        /**
         * @see Listn
         */
        if (!empty($dlRow["ul"])) {
            echo $this->widget->init('listn', array('ul' => $dlRow["ul"]));
        }
        echo N2Html::closeTag('dd');
    }
}
echo N2Html::closeTag('dl');
开发者ID:vicpril,项目名称:rep_bidqa,代码行数:31,代码来源:view.php

示例14: defined

<?php

/**
* @author    Roland Soos
* @copyright (C) 2015 Nextendweb.com
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
**/
defined('_JEXEC') or die('Restricted access');
echo N2Html::openTag('div', $attributes);
if ($image[0] == '<') {
    ?>
    <?php 
    echo $image;
} else {
    ?>
    <img src="<?php 
    echo N2ImageHelper::fixed($image);
    ?>
"/>
<?php 
}
?>


<?php 
if ($lt) {
    echo N2Html::tag('div', $ltAttributes, $lt);
}
if ($rt) {
    echo N2Html::tag('div', $rtAttributes, $rt);
}
开发者ID:RenatoToasa,项目名称:Pagina-Web,代码行数:31,代码来源:view.php

示例15: function

                hideSidebarButtons = $('.n2-hide-sidebar')
                    .on('click', function () {
                        if (n2.hasClass('n2-sidebar-hidden')) {
                            n2.removeClass('n2-sidebar-hidden');
                        } else {
                            n2.addClass('n2-sidebar-hidden');
                        }
                        $(window).trigger('resize');
                    });
        }
    );
</script>

<?php 
echo N2Html::openTag('div', array('class' => 'n2-table n2-table-fixed'));
echo N2Html::openTag('div', array('class' => 'n2-tr'));
if (!empty($logoUrl)) {
    echo N2Html::tag('div', array('class' => 'n2-td n2-blue-logo-bg n2-logo n2-border-radius-tl'), N2Html::tag('a', array('href' => $logoUrl), N2Html::image($logoImageUrl)));
}
?>
<div class="n2-td n2-blue-bg n2-header n2-border-radius-tr">
    <?php 
if (isset($actions) && count($actions)) {
    ?>
        <div class="n2-header-action n2-left">
            <?php 
    foreach ($actions as $action) {
        echo $action;
    }
    ?>
        </div>
开发者ID:RenatoToasa,项目名称:Pagina-Web,代码行数:31,代码来源:view.php


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