本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}