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


PHP Html::endTag方法代码示例

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


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

示例1: run

 public function run()
 {
     SelectAsset::register($this->view);
     FilterAsset::register($this->view);
     $values = [];
     foreach ($this->data as $value) {
         $value = strval($value);
         $values[$value] = $value;
     }
     if (!$this->default) {
         $this->default = $this->multiple ? array_keys($values) : key($values);
     }
     $selected = $this->selected($this->default);
     // Setup options
     $options = ['id' => $this->name, 'name' => $this->name . '[]', 'style' => 'width: 300px;', 'class' => 'selectpicker'];
     $extra = ['title' => 'Not selected'];
     if ($this->multiple) {
         $extra['multiple'] = 'multiple';
     }
     if ($this->placeholder) {
         $extra['title'] = strval($this->placeholder);
     }
     $options = array_merge($options, $extra);
     if (!$this->method) {
         $this->method = 'get';
     }
     // Render
     echo Html::beginForm(Url::canonical(), $this->method, ['data-pjax' => '1', 'id' => $this->name]);
     echo Html::beginTag('select', $options, ['data-pjax' => '1']);
     echo Html::renderSelectOptions($selected, $values);
     echo Html::endTag("select");
     echo Html::endForm();
     parent::run();
 }
开发者ID:Polymedia,项目名称:BI-Platform-v3,代码行数:34,代码来源:Filter.php

示例2: printTree

 private function printTree($array, $level = 0, $parent = 0)
 {
     if ($this->groupOptions instanceof \Closure) {
         $func = $this->groupOptions;
         $groupOptions = $func($array, $level, $parent, $this->id);
     } else {
         $groupOptions = $this->groupOptions;
     }
     $groupOptions = array_merge(['id' => $this->id . '-navi-' . $parent], $groupOptions);
     $result = \yii\helpers\Html::beginTag($this->groupTag, $groupOptions);
     foreach ($array as $key => $val) {
         if ($this->elementOptions instanceof \Closure) {
             $func = $this->elementOptions;
             $elementOptions = $func($val, $level, $parent, $this->id);
         } else {
             $elementOptions = $this->elementOptions;
         }
         $result .= \yii\helpers\Html::beginTag($this->elementTag, $elementOptions);
         if ($this->value instanceof \Closure) {
             $value = $this->value;
             $result .= $value($val, $level);
         } else {
             $result .= $val['title'];
         }
         $result .= \yii\helpers\Html::endTag($this->elementTag);
         $result .= $val[$this->childAttribute] ? self::printTree($val[$this->childAttribute], $level + 1, $val['id']) : '';
     }
     $result .= \yii\helpers\Html::endTag($this->groupTag);
     return $result;
 }
开发者ID:chameleon82,项目名称:yiindo,代码行数:30,代码来源:Tree.php

示例3: run

 /**
  * Renders the widget.
  */
 public function run()
 {
     echo Html::beginTag('div', $this->options) . "\n";
     echo $this->renderBar($this->label) . "\n";
     echo Html::endTag('div') . "\n";
     $this->registerPlugin('progress');
 }
开发者ID:2amigos,项目名称:yii2-semantic-ui,代码行数:10,代码来源:Progress.php

示例4: run

 /**
  * @inheritdoc
  */
 public function run()
 {
     if ($this->box) {
         self::boxBegin($this->box);
     }
     echo Html::beginTag('ul', ['class' => 'timeline', 'id' => $this->options['id']]);
     foreach ($this->data as $datum) {
         echo Html::beginTag('li', ['class' => 'time-label']);
         echo Html::tag('span', $datum['date']);
         echo Html::endTag('li');
         foreach ($datum['items'] as $item) {
             echo Html::beginTag('li');
             echo Html::tag('i', null, ['class' => 'fa fa-envelope']);
             echo Html::beginTag('div', ['class' => 'timeline-item']);
             echo Html::beginTag('span', ['class' => 'time']);
             echo Html::tag('i', null, ['class' => 'fa fa-clock-o']);
             echo ' ' . $item['time'];
             echo Html::endTag('span');
             echo Html::tag('h3', $item['header'], ['class' => 'timeline-header']);
             echo Html::tag('div', $item['body'], ['class' => 'timeline-body']);
             echo Html::tag('div', $item['footer'], ['class' => 'timeline-footer']);
             echo Html::endTag('div');
             echo Html::endTag('li');
         }
     }
     echo Html::endTag('ul');
     if ($this->box) {
         self::boxEnd();
     }
 }
开发者ID:AlvaCorp,项目名称:yii2-adminlte-demo,代码行数:33,代码来源:Timeline.php

示例5: run

 /**
  * 
  */
 public function run()
 {
     echo Html::beginTag('section', ['class' => 'top-bar-section']);
     echo $this->renderItems();
     echo Html::endTag('section');
     FoundationAsset::register($this->getView());
 }
开发者ID:am1rb,项目名称:yii2-foundation,代码行数:10,代码来源:TopBarSection.php

示例6: run

 public function run()
 {
     $this->view->registerAssetBundle(MultiSelectAsset::className());
     $options = $this->options;
     if (isset($options['id'])) {
         $id = $options['id'];
     } else {
         $id = BaseHtml::getInputId($this->model, $this->attribute);
     }
     if (isset($options['name'])) {
         $name = $options['name'];
     } elseif ($this->hasModel()) {
         $name = BaseHtml::getInputName($this->model, $this->attribute);
     } else {
         $name = $this->name;
     }
     //        if (isset($options['value'])) {
     //            $value = $options['value'];
     //        } elseif ($this->hasModel()) {
     //            $value = BaseHtml::getAttributeValue($this->model, $this->attribute);
     //        } else {
     //            $value = $this->value;
     //        }
     $len = strlen($this->attribute);
     $widget = Html::beginTag('div', ['id' => $id, 'name' => $name]);
     foreach ($this->model as $k => $v) {
         if (substr($k, 0, $len + 1) == $this->attribute . '_') {
             $widget .= Html::activeCheckbox($this->model, $k, ['labelOptions' => ['class' => 'checkbox-inline']]);
         }
     }
     $widget .= Html::endTag('div');
     echo $widget;
 }
开发者ID:gerpayt,项目名称:yii2-multiselect,代码行数:33,代码来源:MultiSelectWidget.php

示例7: run

 /**
  * Renders the widget.
  */
 public function run()
 {
     echo Html::beginTag('a', $this->options);
     echo Html::tag('i', '', ['class' => 'fa fa-' . $this->button]);
     echo $this->iconOnly ? '' : $this->label;
     echo Html::endTag('a');
 }
开发者ID:krai500,项目名称:yii2-bootstrapsocial,代码行数:10,代码来源:Button.php

示例8: init

 /**
  * Initializes the widget.
  */
 public function init()
 {
     parent::init();
     echo Html::beginTag('div', ['class' => 'modal fade', 'id' => $this->modalId, 'role' => "dialog"]);
     echo Html::beginTag('div', ['class' => 'modal-dialog ' . $this->modalSize]);
     echo Html::beginTag('div', ['class' => 'modal-content']);
     echo Html::beginTag('div', ['class' => 'modal-header']);
     echo Html::beginTag('button', ['type' => "button", 'class' => "close", 'data-dismiss' => "modal"]);
     echo Html::beginTag('span', ['aria-hidden' => "true"]);
     echo "×";
     echo Html::endTag('span');
     echo Html::beginTag('span', ['class' => "sr-only"]);
     echo "Close";
     echo Html::endTag('span');
     echo Html::endTag('button');
     echo Html::beginTag('h4', ['class' => "modal-title"]);
     echo Html::endTag('h4');
     echo Html::endTag('div');
     echo Html::beginTag('div', ['class' => 'modal-body']);
     echo Html::beginTag('div', ['class' => 'content', 'style' => 'overflow:auto;']);
     echo Html::endTag('div');
     echo Html::endTag('div');
     /* modal-footer tak hapus. Kayaknya ga pernah kepake. Biar tampilan modalnya bagus, ga ada garis bawah pengganggu
     			echo Html::beginTag('div', ['class'=>'modal-footer']);
     		
     			echo Html::endTag('div');*/
     echo Html::endTag('div');
     echo Html::endTag('div');
     echo Html::endTag('div');
     if ($this->registerAsset) {
         ModalAsset::register($this->getView());
     }
 }
开发者ID:hscstudio,项目名称:yii2-heart,代码行数:36,代码来源:Modal.php

示例9: run

 /**
  * Renders the widget.
  */
 public function run()
 {
     echo Html::endTag('div');
     //closes the container, opened on init
     $this->infiniteScrollScript();
     $this->registerPlugin();
 }
开发者ID:luoche,项目名称:iisns,代码行数:10,代码来源:Masonry.php

示例10: run

 /**
  * Renders the widget.
  */
 public function run()
 {
     echo Html::beginTag('div', $this->options) . "\n";
     echo $this->renderProgress() . "\n";
     echo Html::endTag('div') . "\n";
     UIkitAsset::register($this->getView());
 }
开发者ID:zydecode,项目名称:yii2-uikit,代码行数:10,代码来源:Progress.php

示例11: run

 /**
  * Executes the widget.
  */
 public function run()
 {
     echo Html::beginTag('div', ['class' => 'btn-group']);
     echo $this->renderButton() . "\n" . $this->renderDropdown();
     echo Html::endTag('div');
     $this->registerPlugin('button');
 }
开发者ID:luobenyu,项目名称:yii2-athens,代码行数:10,代码来源:DropdownContent.php

示例12: registerAssets

 /**
  * Registers the needed assets
  */
 public function registerAssets()
 {
     $view = $this->getView();
     $obj = VideoJsAsset::register($view);
     echo "\n" . Html::beginTag('video', $this->options);
     if (!empty($this->tags) && is_array($this->tags)) {
         foreach ($this->tags as $tagName => $tags) {
             if (is_array($this->tags[$tagName])) {
                 foreach ($tags as $tagOptions) {
                     $tagContent = '';
                     if (isset($tagOptions['content'])) {
                         $tagContent = $tagOptions['content'];
                         unset($tagOptions['content']);
                     }
                     echo "\n" . Html::tag($tagName, $tagContent, $tagOptions);
                 }
             } else {
                 throw new InvalidConfigException("Invalid config for 'tags' property.");
             }
         }
     }
     echo "\n" . Html::endTag('video');
     if (!empty($this->jsOptions)) {
         $js = 'videojs("#' . $this->options['id'] . '").ready(' . Json::encode($this->jsOptions) . ');';
         $view->registerJs($js);
     }
 }
开发者ID:Shiwangi-Gaur,项目名称:yii2-videojs-widget,代码行数:30,代码来源:VideoJsWidget.php

示例13: run

 /**
  * Renders the widget.
  */
 public function run()
 {
     echo Html::beginTag('div', $this->options) . "\n";
     echo $this->renderItems() . "\n";
     echo Html::endTag('div') . "\n";
     $this->registerPlugin('collapse');
 }
开发者ID:su-xiaolin,项目名称:yii2-metronic,代码行数:10,代码来源:Accordion.php

示例14: renderItems

 /**
  * @return string
  */
 protected function renderItems()
 {
     return Html::ul($this->items, ['encode' => false, 'item' => function ($item, $index) {
         if (!isset($item['fontSize'])) {
             $item['fontSize'] = self::DEFAULT_FONT_SIZE;
         }
         $html = '';
         $html .= Html::beginTag('li', ['data-transition' => 'fade', 'data-slotamount' => '1', 'data-masterspeed' => '1000', 'data-style' => 'dark']);
         $html .= Html::img($item['imageUrl'], ['data-bgposition' => 'center center', 'data-bgfit' => 'cover', 'data-bgrepeat' => 'no-repeat']);
         // MAIN TITLE
         $html .= Html::beginTag('div', ['class' => 'caption customin customout', 'data-x' => 'center', 'data-y' => 'center', 'data-hoffset' => '', 'data-voffset' => '-30', 'data-speed' => '500', 'data-start' => '1000', 'data-customin' => 'x:0;y:0;z:0;rotationX:0.5;rotationY:0;rotationZ:0;scaleX:0.75;scaleY:0.75;skewX:0;skewY:0;opacity:0;transformPerspective:600;transformOrigin:50% 50%;', 'data-customout' => 'x:0;y:0;z:0;rotationX:0;rotationY:0;rotationZ:0;scaleX:0.75;scaleY:0.75;skewX:0;skewY:0;opacity:0;transformPerspective:600;transformOrigin:50% 50%;', 'data-easing' => 'Back.easeOut', 'data-splitin' => 'none', 'data-splitout' => 'none', 'data-elementdelay' => '0.1', 'data-endelementdelay' => '0.1', 'data-endspeed' => '600']);
         $html .= Html::tag('h3', $item['title'], ['class' => "c-main-title c-font-{$item['fontSize']} c-font-bold c-font-center c-font-uppercase c-font-white c-block"]);
         $html .= Html::endTag('div');
         // SUB TITLE
         if (isset($item['subTitle'])) {
             $html .= Html::beginTag('div', ['class' => 'caption customin customout', 'data-x' => 'left', 'data-y' => 'bottom', 'data-hoffset' => '', 'data-voffset' => '', 'data-speed' => '500', 'data-start' => '1800', 'data-customin' => 'x:0;y:0;z:0;rotationX:0.5;rotationY:0;rotationZ:0;scaleX:0.75;scaleY:0.75;skewX:0;skewY:0;opacity:0;transformPerspective:600;transformOrigin:50% 50%;', 'data-customout' => 'x:0;y:0;z:0;rotationX:0;rotationY:0;rotationZ:0;scaleX:0.75;scaleY:0.75;skewX:0;skewY:0;opacity:0;transformPerspective:600;transformOrigin:50% 50%;', 'data-easing' => 'Back.easeOut', 'data-splitin' => 'none', 'data-splitout' => 'none', 'data-elementdelay' => '0.1', 'data-endelementdelay' => '0.1', 'data-endspeed' => '600', 'style' => 'width: 100%;']);
             $html .= Html::beginTag('div', ['class' => 'c-action-bar']);
             $html .= Html::beginTag('div', ['class' => 'container']);
             $html .= Html::beginTag('div', ['class' => 'c-content']);
             $html .= Html::tag('h3', $item['subTitle'], ['class' => 'c-font-30 c-font-sbold c-font-white']);
             $html .= Html::endTag('div');
             $html .= Html::endTag('div');
             $html .= Html::endTag('div');
             $html .= Html::endTag('div');
         }
         $html .= Html::endTag('li');
         return $html;
     }]);
 }
开发者ID:anli,项目名称:yii2-jango,代码行数:32,代码来源:RevoSlider8.php

示例15: run

 public function run()
 {
     $options = $this->options;
     if (isset($options['id'])) {
         $id = $options['id'];
     } else {
         $id = 'editor';
     }
     if (isset($options['name'])) {
         $name = $options['name'];
     } elseif ($this->hasModel()) {
         $name = BaseHtml::getInputName($this->model, $this->attribute);
     } else {
         $name = $this->name;
     }
     if (isset($options['value'])) {
         $value = $options['value'];
     } elseif ($this->hasModel()) {
         $value = BaseHtml::getAttributeValue($this->model, $this->attribute);
     } else {
         $value = $this->value;
     }
     echo Html::beginTag('script', ['id' => $id, 'type' => 'text/plain', 'name' => $name, 'style' => "height:{$this->height}"]);
     echo $value;
     echo Html::endTag('script');
     if (!isset($options['config'])) {
         $options['config'] = [];
     }
     $ueditorConfig = ArrayHelper::merge(['serverUrl' => Url::to(['ueditor/controller'])], $options['config']);
     $config = Json::encode($ueditorConfig);
     $view = $this->getView();
     UEditorAsset::register($view);
     $view->registerJs("var ue = UE.getEditor('{$id}', {$config});");
 }
开发者ID:gerpayt,项目名称:yii2-ueditor,代码行数:34,代码来源:UEditorWidget.php


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