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


PHP N2Html::closeTag方法代码示例

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


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

示例1: 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

示例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: 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

示例4: decorateFormEnd

 function decorateFormEnd()
 {
     echo N2Html::closeTag("div");
     N2GoogleFonts::addFont('Open Sans');
     N2GoogleFonts::addFont('Open Sans', 600);
     N2GoogleFonts::addFont('Open Sans', 700);
 }
开发者ID:vicpril,项目名称:rep_bidqa,代码行数:7,代码来源:form.php

示例5: 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

示例6: renderType

    protected function renderType()
    {
        $params = $this->slider->params;
        N2JS::addFiles(N2Filesystem::translate(dirname(__FILE__) . "/gsap"), array("MainAnimationSimple.js", "TypeSimple.js", "ResponsiveSimple.js"), "smartslider-simple-type-frontend");
        N2JS::addFiles(N2Filesystem::translate(dirname(__FILE__) . "/gsap"), array("BackgroundAnimation.js"), "smartslider-simple-type-frontend");
        N2JS::addFiles(NEXTEND_SMARTSLIDER_ASSETS . "/js/animation", array("BackgroundAnimationAbstract.js", 'Flux.js'), "smartslider-simple-type-frontend");
        $background = $params->get('background');
        $css = $params->get('slider-css');
        $slidecss = $params->get('slide-css');
        if (!empty($background)) {
            $css = 'background-image: url(' . N2ImageHelper::fixed($background) . ');';
        }
        $this->initBackgroundAnimation();
        echo $this->openSliderElement();
        ?>

        <div class="n2-ss-slider-1" style="<?php 
        echo $css;
        ?>
">
            <?php 
        echo $this->getBackgroundVideo($params);
        ?>
            <div class="n2-ss-slider-2">
                <?php 
        if ($this->backgroundAnimation) {
            ?>
                    <div class="n2-ss-background-animation"></div>
                <?php 
        }
        ?>
                <div class="n2-ss-slider-3" style="<?php 
        echo $slidecss;
        ?>
">

                    <?php 
        echo $this->slider->staticHtml;
        foreach ($this->slider->slides as $i => $slide) {
            echo N2Html::tag('div', $slide->attributes + array('class' => 'n2-ss-slide n2-ss-canvas ' . $slide->classes, 'style' => $slide->style), $slide->background . $slide->getHTML());
        }
        ?>
                </div>
            </div>
        </div>
        <?php 
        $this->widgets->echoRemainder();
        echo N2Html::closeTag('div');
        $this->javaScriptProperties['mainanimation'] = array('type' => $params->get('animation'), 'duration' => intval($params->get('animation-duration')), 'delay' => intval($params->get('animation-delay')), 'ease' => $params->get('animation-easing'), 'parallax' => floatval($params->get('animation-parallax')), 'shiftedBackgroundAnimation' => $params->get('animation-shifted-background-animation'));
        $this->javaScriptProperties['mainanimation']['shiftedBackgroundAnimation'] = 0;
        $this->javaScriptProperties['carousel'] = intval($params->get('carousel'));
        $this->javaScriptProperties['dynamicHeight'] = intval($params->get('dynamic-height', '0'));
        $this->javaScriptProperties['dynamicHeight'] = 0;
        N2Plugin::callPlugin('nextendslider', 'onNextendSliderProperties', array(&$this->javaScriptProperties));
        N2JS::addFirstCode("new NextendSmartSliderSimple('#{$this->slider->elementId}', " . json_encode($this->javaScriptProperties) . ");");
        echo N2Html::clear();
    }
开发者ID:vicpril,项目名称:rep_bidqa,代码行数:57,代码来源:type.php

示例7: 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

示例8: 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

示例9: 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

示例10: 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

示例11: 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

示例12: 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

示例13: 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

示例14: render


//.........这里部分代码省略.........
             switch ($orientation) {
                 case 'vertical':
                     if (!$showImage) {
                         $width = 0;
                     }
                     $containerStyle = "width: " . ($width + $captionSize) . "px; height: {$height}px;";
                     $captionExtraStyle .= "width: {$captionSize}px";
                     break;
                 default:
                     if (!$showImage) {
                         $height = 0;
                     }
                     $containerStyle = "width: {$width}px; height: " . ($height + $captionSize) . "px;";
                     $captionExtraStyle .= "height: {$captionSize}px";
             }
             break;
         default:
             $containerStyle = "width: {$width}px; height: {$height}px;";
     }
     $image = '';
     $rows = array();
     $i = 0;
     foreach ($slider->slides as $slide) {
         $active = '';
         if ($slider->_activeSlide == $i) {
             $active = 'n2-active ';
         }
         if ($orientation == 'horizontal') {
             $row = $i % $group;
         } else {
             $row = intval($i / $group);
         }
         if (!isset($rows[$row])) {
             $rows[$row] = array();
         }
         if ($showImage) {
             $image = N2Html::tag('div', array('class' => 'n2-ss-thumb-image', 'style' => "background-image: URL('" . $slide->getThumbnail() . "'); width: {$width}px; height: {$height}px;"), '');
         }
         $inner = '';
         if ($showCaption) {
             $html = '';
             if ($showTitle) {
                 $html .= N2Html::tag('div', array('class' => $titleFont), $slide->getTitle());
             }
             $description = $slide->getDescription();
             if ($showDescription && !empty($description)) {
                 $html .= N2Html::tag('div', array('class' => $descriptionFont), $description);
             }
             $inner = N2Html::tag('div', array('class' => $captionStyle . 'n2-ss-caption ' . $captionClass, 'style' => $captionExtraStyle), $html);
         }
         switch ($captionPlacement) {
             case 'before':
                 $inner .= $image;
                 break;
             case 'after':
             default:
                 $inner = $image . $inner;
         }
         $rows[$row][] = N2Html::tag('td', array(), N2Html::tag('div', array('class' => $slideStyle . $active, 'style' => $containerStyle), $inner));
         $i++;
     }
     foreach ($rows as $row) {
         $slides .= N2Html::tag('tr', array(), implode('', $row));
     }
     $slides .= N2Html::closeTag('table');
     $parameters = array('overlay' => $params->get(self::$key . 'position-mode') != 'simple' || $params->get(self::$key . 'overlay'), 'area' => intval($params->get(self::$key . 'position-area')), 'orientation' => $orientation, 'group' => $group, 'action' => $params->get(self::$key . 'action'));
     N2JS::addInline('new NextendSmartSliderWidgetThumbnailDefault("' . $id . '", ' . json_encode($parameters) . ');');
     $size = $params->get(self::$key . 'size');
     if ($orientation == 'horizontal') {
         if (is_numeric($size) || substr($size, -1) == '%' || substr($size, -2) == 'px') {
             $style .= 'width:' . $size . ';';
         } else {
             $attributes['data-sswidth'] = $size;
         }
     } else {
         if (is_numeric($size) || substr($size, -1) == '%' || substr($size, -2) == 'px') {
             $style .= 'height:' . $size . ';';
         } else {
             $attributes['data-ssheight'] = $size;
         }
     }
     $previous = $next = '';
     $showArrow = intval($slider->params->get(self::$key . 'arrow', 1));
     if ($showArrow) {
         $previous = N2Html::image('data:image/svg+xml;base64,' . base64_encode(N2Filesystem::readFile(N2ImageHelper::fixed('$ss$/plugins/widgetthumbnail/default/default/thumbnail-up-arrow.svg', true))), '', array('class' => 'nextend-thumbnail-button nextend-thumbnail-previous'));
         $next = N2Html::image('data:image/svg+xml;base64,' . base64_encode(N2Filesystem::readFile(N2ImageHelper::fixed('$ss$/plugins/widgetthumbnail/default/default/thumbnail-down-arrow.svg', true))), '', array('class' => 'nextend-thumbnail-button nextend-thumbnail-next n2-active'));
     }
     if ($params->get(self::$key . 'position-mode') == 'simple' && $orientation == 'vertical') {
         $area = $params->get(self::$key . 'position-area');
         switch ($area) {
             case '5':
             case '6':
             case '7':
             case '8':
                 $attributes['data-sstop'] = '0';
                 break;
         }
     }
     return N2Html::tag('div', $displayAttributes + $attributes + array('class' => $displayClass . 'nextend-thumbnail nextend-thumbnail-default nextend-thumbnail-' . $orientation, 'style' => $style), $previous . $next . N2Html::tag('div', array('class' => 'nextend-thumbnail-inner'), N2Html::tag('div', array('class' => $barStyle . 'nextend-thumbnail-scroller'), $slides)));
 }
开发者ID:rfulwell,项目名称:transitionalresources.org,代码行数:101,代码来源:default.php

示例15: 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,代码行数:30,代码来源:view.php


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