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


PHP CHtml::closeTag方法代码示例

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


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

示例1: run

 public function run()
 {
     $criteria = new CDbCriteria();
     $criteria->addCondition('status=1');
     if ($this->catId) {
         $criteria->addCondition('term_id=' . $this->catId);
     }
     if ($this->currentId) {
         $criteria->addCondition('id<>' . $this->currentId);
     }
     $criteria->order = 'create_time DESC';
     $criteria->limit = 20;
     $news = News::model()->findAll($criteria);
     echo CHtml::openTag("div", array('class' => 'title', 'style' => 'color: #000000;font-size: 18px;'));
     echo "Tin khác";
     echo CHtml::closeTag("div");
     if ($news) {
         echo CHtml::openTag("ul", array('style' => 'border: 1px solid #CCCCCC;
 border-radius: 4px 4px 4px 4px;
 margin: 8px 0px 0px 0px;
 padding: 10px 5px;list-style:none;'));
         foreach ($news as $n) {
             echo CHtml::openTag('li');
             echo CHtml::link($n->title, array('/news/detail', 'id' => $n->id, 'tid' => $n->term_id, 'title' => Lnt::safeTitle($n->title))) . " <span style='color:#a7a7a7'>({$n->view})</span>";
             echo CHtml::closeTag('li');
         }
         echo CHtml::closeTag("ul");
     }
 }
开发者ID:ngdvan,项目名称:lntguitar,代码行数:29,代码来源:OtherNews.php

示例2: renderItems

 /**
  * Renders the data item list.
  */
 public function renderItems()
 {
     echo CHtml::openTag('table', array('class' => 'po-table mind-list')) . "\n";
     echo CHtml::openTag('thead') . "\n";
     echo CHtml::tag('th', array('width' => 20), '&nbsp;') . "\n";
     echo CHtml::tag('th', array(), '&nbsp;') . "\n";
     echo CHtml::tag('th', array('width' => 30), '&nbsp;') . "\n";
     echo CHtml::tag('th', array('width' => 100), '&nbsp;') . "\n";
     echo CHtml::tag('th', array('width' => 150), '<span class="mind-list__clear-all">удалить все</span>') . "\n";
     echo CHtml::closeTag('thead');
     echo CHtml::openTag($this->itemsTagName, array('class' => $this->itemsCssClass)) . "\n";
     $data = $this->dataProvider->getData();
     if (($n = count($data)) > 0) {
         $owner = $this->getOwner();
         $viewFile = $owner->getViewFile($this->itemView);
         $j = 0;
         foreach ($data as $i => $item) {
             $data = $this->viewData;
             $data['index'] = $i;
             $data['data'] = $item;
             $data['widget'] = $this;
             $owner->renderFile($viewFile, $data);
             if ($j++ < $n - 1) {
                 echo $this->separator;
             }
         }
     }
     echo CHtml::closeTag($this->itemsTagName);
     echo CHtml::closeTag('table');
 }
开发者ID:kuzmina-mariya,项目名称:happy-end,代码行数:33,代码来源:ListView.php

示例3: run

 /**
  * ### .run()
  *
  * Runs the widget.
  */
 public function run()
 {
     $options = !empty($this->options) ? CJavaScript::encode($this->options) : '';
     $id = !empty($this->htmlOptions['id']) ? $this->htmlOptions['id'] : $this->getId();
     $elementId = !empty($this->options['elementId']) ? $this->options['elementId'] : 'null';
     $elementUrl = !empty($this->options['elementUrl']) ? $this->options['elementUrl'] : 'null';
     echo CHtml::openTag('div', $this->htmlOptions);
     echo CHtml::openTag('table');
     echo '<thead><tr class="head"><th id="prev" style="visibility: visible;"><i class="icon-arrow-left"></i></th><th colspan="5" class="switch" style="text-align:center;">' . date("Y") . "年" . date("n") . "月" . '</th><th id="next" style="visibility: visible;"><i class="icon-arrow-right-2"></i></th></thead>';
     echo '<tbody></tbody>';
     echo CHtml::closeTag('table');
     echo CHtml::closeTag('div');
     ob_start();
     Yii::app()->getClientScript()->registerScript(__CLASS__ . '#' . $this->getId(), ob_get_clean() . ';');
     if (isset($_GET['date'])) {
         $year = date("Y", strtotime($_GET['date']));
         $month = date("n", strtotime($_GET['date']));
         $day = date("j", strtotime($_GET['date']));
     } else {
         $year = date("Y");
         $month = date("n");
         $day = date("j");
     }
     $this->registerJs($id, $year, $month, $day, $elementId, $elementUrl);
 }
开发者ID:GsHatRed,项目名称:Yiitest,代码行数:30,代码来源:TCalendar.php

示例4: run

 public function run()
 {
     if (empty($this->links)) {
         return;
     }
     $this->activeLinkTemplate = '<a href="{url}" title="{title}" rel="v:url" property="v:title">{label}</a>';
     echo CHtml::openTag($this->tagName, $this->htmlOptions) . "\n";
     $links = array();
     if ($this->homeLink === null) {
         $links[] = CHtml::link(Yii::t('zii', 'Home'), Yii::app()->homeUrl);
     } elseif ($this->homeLink !== false) {
         $links[] = $this->homeLink;
     }
     foreach ($this->links as $label => $url) {
         if (is_string($label) || is_array($url)) {
             $links[] = strtr($this->activeLinkTemplate, array('{url}' => CHtml::normalizeUrl($url), '{label}' => $this->encodeLabel ? CHtml::encode($label) : $label, '{title}' => $this->encodeLabel ? CHtml::encode($label) : $label));
         } else {
             $links[] = str_replace('{label}', $this->encodeLabel ? CHtml::encode($url) : $url, $this->inactiveLinkTemplate);
         }
     }
     echo "<div xmlns:v='http://rdf.data-vocabulary.org/#'>";
     $i = 0;
     foreach ($links as $link) {
         if ($i > 0) {
             echo '&nbsp;&nbsp;<i class="icon icon_mt"></i>&nbsp;&nbsp;';
         }
         echo '<span typeof="v:Breadcrumb">' . $link . '</span>';
         $i++;
     }
     echo "</div>";
     //echo implode($this->separator,$links);
     echo CHtml::closeTag($this->tagName);
 }
开发者ID:giangnh264,项目名称:mobileplus,代码行数:33,代码来源:VBreadcrumbs.php

示例5: run

 public function run()
 {
     if (empty($this->links)) {
         return;
     }
     echo CHtml::openTag($this->tagName, $this->htmlOptions) . "\n";
     $links = array();
     if ($this->homeLink === null) {
         $links[] = CHtml::link(Yii::t('zii', 'Home'), Yii::app()->homeUrl);
     } else {
         if ($this->homeLink !== false) {
             $links[] = $this->homeLink;
         }
     }
     $i = 1;
     foreach ($this->links as $label => $url) {
         if (is_string($label) || is_array($url)) {
             if (count($this->links) == $i) {
                 $links[] = CHtml::link($this->encodeLabel ? CHtml::encode($label) : $label, $url, array('class' => $this->lastCssClass));
             } else {
                 $links[] = CHtml::link($this->encodeLabel ? CHtml::encode($label) : $label, $url);
             }
         } else {
             if (count($this->links) == $i) {
                 $links[] = '<span class="' . $this->lastCssClass . '">' . ($this->encodeLabel ? CHtml::encode($url) : $url) . '</span>';
             } else {
                 $links[] = '<span>' . ($this->encodeLabel ? CHtml::encode($url) : $url) . '</span>';
             }
         }
         $i++;
     }
     echo implode($this->separator, $links);
     echo CHtml::closeTag($this->tagName);
 }
开发者ID:kinghinds,项目名称:kingtest2,代码行数:34,代码来源:DBreadcrumbs.php

示例6: run

 public function run()
 {
     if (empty($this->links)) {
         return;
     }
     echo CHtml::openTag($this->tagName, $this->htmlOptions) . "\n";
     $links = array();
     echo '<span class="m_left20">当前位置:</span>';
     if ($this->homeLink === null) {
         $links[] = CHtml::link("工作台", Yii::app()->homeUrl);
     } else {
         if ($this->homeLink !== false) {
             $links[] = $this->homeLink;
         }
     }
     foreach ($this->links as $label => $url) {
         if (is_string($label) || is_array($url)) {
             $links[] = CHtml::link($this->encodeLabel ? CHtml::encode($label) : $label, $url);
         } else {
             $links[] = '<span>' . ($this->encodeLabel ? CHtml::encode($url) : $url) . '</span>';
         }
     }
     echo implode($this->separator, $links);
     echo CHtml::closeTag($this->tagName);
 }
开发者ID:zwq,项目名称:unpei,代码行数:25,代码来源:WBreadcrumbs.php

示例7: run

 /**
  * Renders the widget. If there are no items, nothing will be rendered.
  * TODO: Reuse TbCollapse somehow
  */
 public function run()
 {
     $itemCount = count($this->items);
     if ($itemCount === 0) {
         return;
     }
     echo CHtml::openTag('div', $this->htmlOptions);
     foreach ($this->items as $k => $item) {
         $id = __CLASS__ . '_' . $this->id . '_' . $k;
         $contentId = $id . '_content';
         $linkOptions = array('class' => 'accordion-toggle episode-toggle', 'data-content-id' => $contentId, 'data-toggle' => 'collapse', 'data-parent' => $this->id);
         // Add content-url data attributes to the link when available
         if (isset($item['contentUrl'])) {
             $linkOptions['data-content-url'] = $item['contentUrl'];
         }
         // Render the contents of the heading
         $heading = $this->render('_seasonAccordionHeading', array('linkUrl' => '#' . $id, 'linkOptions' => $linkOptions, 'season' => $item['season']), true);
         $bodyOptions = array('class' => 'accordion-body collapse', 'id' => $id);
         if ($itemCount === 1) {
             TbHtml::addCssClass('in', $bodyOptions);
         }
         echo CHtml::openTag('div', array('class' => 'accordion-group'));
         echo CHtml::tag('div', array('class' => 'accordion-heading'), $heading);
         echo CHtml::openTag('div', $bodyOptions);
         echo CHtml::tag('div', array('id' => $contentId, 'class' => 'accordion-inner'), $item['content']);
         echo CHtml::closeTag('div');
         echo CHtml::closeTag('div');
     }
     echo CHtml::closeTag('div');
 }
开发者ID:pweisenburger,项目名称:xbmc-video-server,代码行数:34,代码来源:SeasonAccordion.php

示例8: render

 public function render()
 {
     parent::appendOption($this->_htmlOptions, 'class', $this->_cssClass);
     echo CHtml::openTag('li', $this->_htmlOptions);
     if (!empty($this->_data)) {
         echo '<ul>';
         foreach ($this->_data as $item) {
             $i = $item['icon'];
             $l = $item['label'];
             $u = $item['url'];
             echo '<li>';
             if (!empty($i)) {
                 if (is_array($i)) {
                     $img = CHtml::tag('img', $i, '');
                 } else {
                     $img = CHtml::image($i, CHtml::encode($l));
                 }
                 $l = $img . $l;
             }
             echo CHtml::link($l, $u, @$item['htmlOptions']);
             echo '</li>';
         }
         echo '</ul>';
     }
     echo CHtml::closeTag('li');
 }
开发者ID:alexskull,项目名称:Ushi,代码行数:26,代码来源:QtzPanelElement_stack.php

示例9: run

 public function run()
 {
     echo CHtml::tag($this->tag, array('id' => $this->id));
     echo CHtml::closeTag($this->tag);
     $options = CJavaScript::encode($this->options);
     Yii::app()->getClientScript()->registerScript('jwplayer' . $this->id, "jwplayer('{$this->id}').setup({$options})");
 }
开发者ID:schyzoo,项目名称:YiiBoilerplate,代码行数:7,代码来源:Jwplayer.php

示例10: run

 /**
  * Renders the widget.
  */
 public function run()
 {
     echo \CHtml::openTag('div', $this->options) . "\n";
     echo $this->renderItems() . "\n";
     echo \CHtml::closeTag('div') . "\n";
     $this->registerPlugin('collapse');
 }
开发者ID:abudayah,项目名称:yiiwheels-custom,代码行数:10,代码来源:Collapse.php

示例11: run

	/**
	 * Runs the widget.
	 */
	public function run()
	{
		$id=$this->getId();

		if (isset($this->htmlOptions['id']))
			$id = $this->htmlOptions['id'];
		else
			$this->htmlOptions['id']=$id;

		if(is_string($this->keys))
			$this->keys=array($this->keys);

		$markup='';
		foreach($this->keys as $key)
		{
			if(Yii::app()->user->hasFlash($key))
			{
				$markup.=strtr($this->template,array(
					'{key}'=>$key,
					'{message}'=>Yii::app()->user->getFlash($key),
				));
			}
		}

		if($markup!=='')
		{
			echo CHtml::openTag('div',$this->htmlOptions);
			echo $markup;
			echo CHtml::closeTag('div');
		}

		Yii::app()->clientScript->registerScript(__CLASS__.'#'.$id,
				"jQuery('#$id').animate({opacity: 2.0}, 3000).fadeOut('slow');",CClientScript::POS_READY);
	}
开发者ID:nizsheanez,项目名称:PolymorphCMS,代码行数:37,代码来源:Flash.php

示例12: run

 public function run()
 {
     if (empty($this->links)) {
         return;
     }
     $this->activeLinkTemplate = '<a href="{url}" itemprop="url"><span title="{label}" itemprop="title">{label}</span></a>';
     echo CHtml::openTag($this->tagName, $this->htmlOptions) . "\n";
     $links = array();
     if ($this->homeLink === null) {
         $links[] = CHtml::link(Yii::t('zii', 'Home'), Yii::app()->homeUrl);
     } elseif ($this->homeLink !== false) {
         $links[] = $this->homeLink;
     }
     foreach ($this->links as $label => $url) {
         if (is_string($label) || is_array($url)) {
             $links[] = strtr($this->activeLinkTemplate, array('{url}' => CHtml::normalizeUrl($url), '{label}' => $this->encodeLabel ? CHtml::encode($label) : $label, '{title}' => $this->encodeLabel ? CHtml::encode($label) : $label));
         } else {
             $links[] = str_replace('{label}', $this->encodeLabel ? CHtml::encode($url) : $url, $this->inactiveLinkTemplate);
         }
     }
     echo '<ul data-tracking-cat="breadcrumbs">';
     $i = 0;
     foreach ($links as $link) {
         if ($i > 0) {
             echo '<li class="separ"><span class="br-arr"></span></li>';
         }
         echo '<li itemscope="itemscope" itemtype="http://data-vocabulary.org/Breadcrumb">
                 ' . $link . '
             </li>';
         $i++;
     }
     echo "</ul>";
     //echo implode($this->separator,$links);
     echo CHtml::closeTag($this->tagName);
 }
开发者ID:phuongitvn,项目名称:vdh,代码行数:35,代码来源:MBreadcrumbs.php

示例13: run

 /**
  * Run widget.
  * @return void
  */
 function run()
 {
     if (is_string($this->content)) {
         echo $this->content;
     }
     echo CHtml::closeTag('div');
 }
开发者ID:sinelnikof,项目名称:yiiext,代码行数:11,代码来源:ESimpleModalWidget.php

示例14: run

 public function run()
 {
     $id = $this->getId();
     if (isset($this->htmlOptions['id'])) {
         $id = $this->htmlOptions['id'];
     } else {
         $this->htmlOptions['id'] = $id;
     }
     echo CHtml::openTag($this->tagName, $this->htmlOptions) . "\n";
     $tabsOut = "";
     $contentOut = "";
     $tabCount = 0;
     foreach ($this->tabs as $title => $content) {
         $tabId = is_array($content) && isset($content['id']) ? $content['id'] : $id . '_tab_' . $tabCount++;
         if (!is_array($content)) {
             $tabsOut .= strtr($this->headerTemplate, array('{title}' => $title, '{url}' => '#' . $tabId, '{id}' => '#' . $tabId)) . "\n";
             $contentOut .= strtr($this->contentTemplate, array('{content}' => $content, '{id}' => $tabId)) . "\n";
         } elseif (isset($content['ajax'])) {
             $tabsOut .= strtr($this->headerTemplate, array('{title}' => $title, '{url}' => CHtml::normalizeUrl($content['ajax']), '{id}' => '#' . $tabId)) . "\n";
         } else {
             $tabsOut .= strtr($this->headerTemplate, array('{title}' => $title, '{url}' => '#' . $tabId, '{id}' => $tabId)) . "\n";
             if (isset($content['content'])) {
                 $contentOut .= strtr($this->contentTemplate, array('{content}' => $content['content'], '{id}' => $tabId)) . "\n";
             }
         }
     }
     echo "<ul class='" . $this->ulClass . "'>\n" . $tabsOut . "</ul>\n";
     echo $contentOut;
     echo CHtml::closeTag($this->tagName) . "\n";
     $options = CJavaScript::encode($this->options);
     Yii::app()->getClientScript()->registerScript(__CLASS__ . '#' . $id, "jQuery('#{$id}').tabs({$options});");
 }
开发者ID:buildshop,项目名称:bs-common,代码行数:32,代码来源:JuiTabs.php

示例15: renderItems

 public function renderItems()
 {
     echo CHtml::openTag($this->itemsTagName, array('class' => $this->itemsCssClass)) . "\n";
     $data = $this->dataProvider->getData();
     if (($n = count($data)) > 0) {
         $owner = $this->getOwner();
         $render = $owner instanceof CController ? 'renderPartial' : 'render';
         $j = 0;
         $bandera = true;
         foreach ($data as $i => $item) {
             $data = $this->viewData;
             $data['index'] = $i;
             $data['data'] = $item;
             $data['widget'] = $this;
             if ($bandera == true) {
                 $owner->{$render}($this->headersview, $data);
                 $bandera = false;
             }
             $owner->{$render}($this->itemView, $data);
             if ($j++ < $n - 1) {
                 echo $this->separator;
             }
         }
         $owner->{$render}($this->footersview, $data);
     } else {
         $this->renderEmptyText();
     }
     echo CHtml::closeTag($this->itemsTagName);
 }
开发者ID:rzamarripa,项目名称:masoftproyectos,代码行数:29,代码来源:TbListView.php


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