當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。