本文整理汇总了PHP中HTMLTags_A类的典型用法代码示例。如果您正苦于以下问题:PHP HTMLTags_A类的具体用法?PHP HTMLTags_A怎么用?PHP HTMLTags_A使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了HTMLTags_A类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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;
}
示例2: 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;
}
示例3: __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);
}
}
示例4: 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;
}
示例5: 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;
}
示例6: 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);
}
示例7: 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;
}
示例8: 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;
}
示例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_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;
}
示例11: 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;
}
示例12: 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;
}
示例13: get_product_id_with_link_td
public function get_product_id_with_link_td()
{
$td = new HTMLTags_TD();
$product = $this->get_element();
$link = new HTMLTags_A($product->get('product_id'));
$url = Admin_AdminIncluderURLFactory::get_url('plug-ins', 'trackit-stock-management', 'product', 'html');
$url->set_get_variable('product_id', $product->get_id());
$link->set_href($url);
$td->append_tag_to_content($link);
return $td;
}
示例14: get_share_drama_li
private function get_share_drama_li()
{
$share_drama_url = $this->get_share_drama_url();
$link = new HTMLTags_A('Share this Drama');
$link->set_href($share_drama_url);
$link->set_attribute_str('id', 'selected');
$li = new HTMLTags_LI();
$li->append_tag_to_content($link);
$li->set_attribute_str('id', 'share-drama');
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();
}