本文整理汇总了PHP中HTMLTags_A::set_href方法的典型用法代码示例。如果您正苦于以下问题:PHP HTMLTags_A::set_href方法的具体用法?PHP HTMLTags_A::set_href怎么用?PHP HTMLTags_A::set_href使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HTMLTags_A
的用法示例。
在下文中一共展示了HTMLTags_A::set_href方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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_login_status_ul
public static function get_login_status_ul()
{
$user_login_manager = UserLogin_LoginManager::get_instance();
$ul = new HTMLTags_UL();
if (!$user_login_manager->is_logged_in()) {
$login_li = new HTMLTags_LI();
$login_url = UserLogin_URLHelper::get_login_page_url();
$login_a = new HTMLTags_A('Login');
$login_a->set_href($login_url);
$login_li->append($login_a);
$ul->append($login_li);
$register_li = new HTMLTags_LI();
$register_url = UserLogin_URLHelper::get_registration_page_url();
$register_a = new HTMLTags_A('Register');
$register_a->set_href($register_url);
$register_li->append($register_a);
$ul->append($register_li);
} else {
$name_li = new HTMLTags_LI();
$name_li->set_attribute_str('id', 'user-name');
$name_li->append($user_login_manager->get_name());
$ul->append($name_li);
$log_out_li = new HTMLTags_LI();
$log_out_li->append($user_login_manager->get_log_out_a());
$ul->append($log_out_li);
}
return $ul;
}
示例3: append_reorder_html_a_to_list
/**
* Appends an HTMLTags_A object to the list so
* that users can link to the admin page where the
* rows in the table are reordered.
*/
public static function append_reorder_html_a_to_list(&$html_as, $xml_config_file_name)
{
$a = new HTMLTags_A('Reorder');
$url = self::get_reorder_table_admin_page($xml_config_file_name);
$a->set_href($url);
$html_as[] = $a;
}
示例4: get_link_a_to_admin_section
private static function get_link_a_to_admin_section($link_text, HTMLTags_URL $href)
{
$a = new HTMLTags_A($link_text);
$a->set_href($href);
$a->set_attribute_str('target', '_blank');
return $a;
}
示例5: __construct
public function __construct($message, $no_script_href = '', $status = NULL)
{
#echo "\$message: $message\n";
#echo "\$no_script_href: $no_script_href\n";
parent::__construct();
$this->set_attribute_str('id', 'lastActionBox');
#if (strlen($no_script_href) > 0) {
# $this->set_attribute_str('class', 'noscript');
#}
if ($status == 'error') {
$this->set_attribute_str('class', 'error');
}
$p = new HTMLTags_P();
$hide_a = new HTMLTags_A('Hide');
$hide_a->set_attribute_str('id', 'lastActionBoxA');
$hide_a->set_href(new HTMLTags_URL($no_script_href));
#if (strlen($no_script_href) < 1) {
# $hide_a->set_href(new HTMLTags_URL('#'));
#} else {
# $hide_a->set_href(new HTMLTags_URL($no_script_href));
#}
$hide_a->set_attribute_str('id', 'lastActionBoxHide');
$hide_a->set_attribute_str('title', 'Hide this notice');
$p->append_tag_to_content($hide_a);
$p->append_str_to_content($message);
$this->append_tag_to_content($p);
}
示例6: __construct
public function __construct(HaddockProjectOrganisation_ProjectDirectory $project_directory)
{
parent::__construct();
$m_w_a_ss = $project_directory->get_modules_with_admin_sections();
foreach ($m_w_a_ss as $m_w_a_s) {
$module_li = new HTMLTags_LI();
$module_a = new HTMLTags_A();
//$module_href = new HTMLTags_URL();
#if (
# is_a(
# $m_w_a_s,
# 'HaddockProjectOrganisation_ProjectSpecificDirectory'
# )
#) {
# $module_name = 'project-specific';
#} else {
# $module_name_l_o_ws = $m_w_a_s->get_module_name_as_l_o_w();
# $module_name = $module_name_l_o_ws->get_words_as_delimited_lc_string('-');
#}
//$module_name = $m_w_a_s->get_admin_section_directory_name();
//
//#$module_href->set_file('/admin/' . $module_name . '/home.html');
//$module_href->set_file('/admin/hc/' . $module_name . '/home.html');
$module_href = $m_w_a_s->get_admin_section_home_page_href();
$module_a->set_href($module_href);
$module_config_file = $m_w_a_s->get_module_config_file();
$module_span = new HTMLTags_Span($module_config_file->get_admin_section_title());
$module_a->append_tag_to_content($module_span);
$module_li->append_tag_to_content($module_a);
$this->add_li($module_li);
}
}
示例7: append_sortable_field_name
/**
* There should be some way to override that capitalisation.
*/
public function append_sortable_field_name($sortable_field_name)
{
$th = new HTMLTags_TH();
$s_f_n_l_o_ws = Formatting_ListOfWords::get_list_of_words_for_string($sortable_field_name, '_');
$sort_link = new HTMLTags_A($s_f_n_l_o_ws->get_words_as_capitalised_string());
$sort_link->set_href($this->get_next_href($sortable_field_name));
$th->append_tag_to_content($sort_link);
$this->append_tag_to_content($th);
}
示例8: get_tag_cloud_div
public function get_tag_cloud_div($current_url, $javascript = FALSE)
{
$tags_table = $this->get_element();
#$database = $productgraph_row->get_database();
#$tags_table = $database->get_table('hpi_shop_product_tags');
#$productgraph_row = $productgraphs_table->get_row_by_id($_GET['productgraph_id']);
#$database = $productgraph_row->get_database();
$tag_cloud_div = new HTMLTags_Div();
$tag_cloud_div->set_attribute_str('id', 'tag_cloud_div');
$tag_cloud_heading = new HTMLTags_Heading(3);
$tag_cloud_heading->append_str_to_content('All Tags');
$tag_cloud_div->append_tag_to_content($tag_cloud_heading);
$tag_cloud_list = new HTMLTags_OL();
$tags = $tags_table->get_tags_with_counts('hpi_shop_product_tags.tag', 'ASC');
foreach ($tags as $tag) {
$tag_cloud_line = new HTMLTags_LI();
$tag_cloud_href = clone $current_url;
$tag_cloud_href->set_get_variable('tag_id', $tag->get_id());
$tag_cloud_link = new HTMLTags_A();
$tag_cloud_link->set_href($tag_cloud_href);
$tag_cloud_link->set_attribute_str('id', $tag->get_id());
if ($javascript) {
$onclick = 'javascript:return tagsOnClick(this);';
$tag_cloud_link->set_attribute_str('onclick', $onclick);
}
#tag_cloud_link->set_attribute_str('id', 'productgraph_page_link');
#echo $tag->get_product_count();
/*
* RFI 2007-03-27
*
* Is this the right way around?
*
* Aren't tags with a lower product count less popular?
*/
#if ($tag->get_product_count() > 3) {
# $tag_cloud_link->set_attribute_str('class', 'not-very-popular');
#}
$popularity_css_class = $tag->get_popularity_css_class();
#echo "\$popularity_css_class: $popularity_css_class\n\n";
$tag_cloud_link->set_attribute_str('class', $popularity_css_class);
$tag_cloud_link->set_attribute_str('rel', 'tag');
$tag_product_count = $tag->get_product_count();
if ($tag_product_count == 1) {
$tag_product_count_span_text = $tag_product_count . ' product is tagged with ';
} else {
$tag_product_count_span_text = $tag_product_count . ' products are tagged with ';
}
$tag_cloud_link_span = new HTMLTags_Span($tag_product_count_span_text);
$tag_cloud_link->append_tag_to_content($tag_cloud_link_span);
$tag_cloud_link->append_str_to_content($tag->get_tag());
$tag_cloud_line->append_tag_to_content($tag_cloud_link);
$tag_cloud_list->append_tag_to_content($tag_cloud_line);
}
$tag_cloud_div->append_tag_to_content($tag_cloud_list);
return $tag_cloud_div;
}
示例9: get_edit_li
private function get_edit_li()
{
$edit_url = $this->get_edit_url();
$link = new HTMLTags_A('Edit this frame');
$link->set_href($edit_url);
$li = new HTMLTags_LI();
$li->append_tag_to_content($link);
$li->set_attribute_str('id', 'edit-frame');
return $li;
}
示例10: get_frame_png_thumbnail_img_a
public static function get_frame_png_thumbnail_img_a(Oedipus_Frame $frame, $max_width = 250, $max_height = 185)
{
$url = Oedipus_DramaHelper::get_drama_page_url_for_frame_id($frame->get_id());
$a = new HTMLTags_A();
$a->set_href($url);
$a->set_attribute_str('title', 'View this Frame');
$img = self::get_frame_png_thumbnail_img($frame, $max_width, $max_height);
$a->append_tag_to_content($img);
return $a;
}
示例11: get_add_new_character_li
private function get_add_new_character_li()
{
$add_new_character_url = $this->get_add_new_character_url();
$link = new HTMLTags_A('add a new character');
$link->set_href($add_new_character_url);
$li = new HTMLTags_LI();
$li->append_tag_to_content($link);
$li->set_attribute_str('id', 'add_new_character');
return $li;
}
示例12: get_link_to_edit_video_admin_page_div
public static function get_link_to_edit_video_admin_page_div($video_id)
{
$div = new HTMLTags_Div();
$div->set_attribute_str('class', 'admin');
$a = new HTMLTags_A('Edit this Video');
$a->set_attribute_str('class', 'edit');
$a->set_href(VideoLibrary_URLHelper::get_edit_external_video_admin_page_url($video_id));
$div->append($a);
return $div;
}
示例13: get_delete_option_li
private function get_delete_option_li()
{
$delete_option_url = $this->get_delete_option_url();
$link = new HTMLTags_A('delete this Option');
$link->set_href($delete_option_url);
$li = new HTMLTags_LI();
$li->append_tag_to_content($link);
$li->set_attribute_str('id', 'delete_option');
return $li;
}
示例14: get_add_act_li
protected function get_add_act_li()
{
$li = new HTMLTags_LI();
$a = new HTMLTags_A('Add Act');
$a->set_attribute_str('id', 'add');
$a->set_attribute_str('title', 'Add an Act');
$a->set_href(Oedipus_DramaHelper::get_add_act_url($this->drama->get_id()));
$li->append($a);
return $li;
}
示例15: get_thumbnail_queue_link
protected function get_thumbnail_queue_link($id)
{
$div = new HTMLTags_Div();
$u = $this->get_redirect_script_url();
$u->set_get_variable('action', 'requeue_video_in_thumbnail_queue');
$u->set_get_variable('id', $id);
$a = new HTMLTags_A('Refetch Thumbnail');
$a->set_href($u);
$div->append($a);
return $div->get_as_string();
}