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


PHP HTMLTags_A::append方法代码示例

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


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

示例1: get_rss_titles_ul

 public function get_rss_titles_ul(RSS_RSS $rss, $limit = 10)
 {
     //                print_r($rss->get_xml());exit;
     $items = $rss->get_items();
     $tempCounter = 0;
     $ul = new HTMLTags_UL();
     $ul->set_attribute_str('class', 'rss');
     foreach ($items as $item) {
         # DISPLAY ONLY 10 ITEMS.
         if ($tempCounter < $limit + 1) {
             $li = new HTMLTags_LI();
             if ($tempCounter % 2 == 0) {
                 $li->set_attribute_str('class', 'odd');
             }
             $a = new HTMLTags_A();
             $url = new HTMLTags_URL();
             $url->set_file($item->get_url_filename());
             $a->set_href($url);
             $a->append($item->get_title());
             $li->append($a);
             $ul->append($li);
         }
         $tempCounter += 1;
     }
     return $ul;
 }
开发者ID:saulhoward,项目名称:haddock-cms,代码行数:26,代码来源:RSS_RSSHelper.inc.php

示例2: get_link_a_with_span

 public static function get_link_a_with_span($node)
 {
     $span = new HTMLTags_Span();
     $span->append($node['url_title']);
     $a = new HTMLTags_A();
     $a->append($span);
     $a->set_href(HTMLTags_URL::parse_and_make_url($node['url_href']));
     $a->set_attribute_str('title', $node['url_title']);
     if ($node['open_in_new_window'] == 'Yes') {
         #echo ' target="_blank" ';
         $a->set_attribute_str('target', '_blank');
     }
     return $a;
 }
开发者ID:saulhoward,项目名称:haddock-cms,代码行数:14,代码来源:Navigation_NodesHelper.inc.php

示例3: get_first_tier_navigation_ul

 public function get_first_tier_navigation_ul()
 {
     $pages = $this->get_pages_for_first_tier_navigation();
     $ul = new HTMLTags_UL();
     foreach ($pages as $page) {
         $li = new HTMLTags_LI();
         if (($this->get_current_page_class_string() == 'VideoLibrary_SearchPage' || $this->get_current_page_class_string() == 'VideoLibrary_HomePage') && $page['name'] == 'home' || $this->get_current_page_class_string() == 'VideoLibrary_TagsPage' && $page['name'] == 'tags') {
             $li->set_attribute_str('class', 'selected');
         }
         $a = new HTMLTags_A();
         $url = new HTMLTags_URL();
         $url->set_file($page['href']);
         $a->set_href($url);
         if ($page['open-in-new-window'] == 'yes') {
             $a->set_attribute_str('target', '_blank');
         }
         $span = new HTMLTags_Span($page['title']);
         $a->append($span);
         $li->append($a);
         $ul->append($li);
     }
     return $ul;
 }
开发者ID:saulhoward,项目名称:haddock-cms,代码行数:23,代码来源:VideoLibrary_PageBuilder.inc.php

示例4: get_tags_navigation_div

 public static function get_tags_navigation_div($tags, $external_video_library_id)
 {
     $div = new HTMLTags_Div();
     $div->set_attribute_str('class', 'tags');
     $ul = new HTMLTags_UL();
     $all_li = new HTMLTags_LI();
     if (!isset($_GET['tag_ids']) && (isset($_GET['page-class']) && $_GET['page-class'] != 'DirtyDodo_TagsPage')) {
         $all_li->set_attribute_str('class', 'selected');
     }
     $all_a = new HTMLTags_A('All');
     $href = '';
     if (isset($_GET['external_video_provider_id'])) {
         $href = VideoLibrary_URLHelper::get_all_tags_url($_GET['external_video_provider_id']);
     } else {
         $href = VideoLibrary_URLHelper::get_all_tags_url();
     }
     $all_a->set_href($href);
     $all_li->append($all_a);
     $ul->append($all_li);
     foreach ($tags as $tag) {
         $li = new HTMLTags_LI();
         if (isset($_GET['tag_ids']) && in_array($tag['id'], explode(',', $_GET['tag_ids']))) {
             $li->set_attribute_str('class', 'selected');
         }
         $a = new HTMLTags_A();
         $tags_array = array();
         $tags_array[] = $tag['id'];
         $href = '';
         if (isset($_GET['external_video_provider_id'])) {
             $href = VideoLibrary_URLHelper::get_tags_and_external_video_provider_search_page_url($tags_array, $_GET['external_video_provider_id']);
         } else {
             $href = VideoLibrary_URLHelper::get_tags_search_page_url($tags_array, $external_video_library_id);
         }
         $a->set_href($href);
         $a->append(ucwords($tag['tag']));
         $li->append($a);
         $ul->append($li);
     }
     $div->append($ul);
     return $div;
 }
开发者ID:saulhoward,项目名称:haddock-cms,代码行数:41,代码来源:VideoLibrary_DisplayHelper.inc.php


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