本文整理汇总了PHP中HTMLTags_A类的典型用法代码示例。如果您正苦于以下问题:PHP HTMLTags_A类的具体用法?PHP HTMLTags_A怎么用?PHP HTMLTags_A使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了HTMLTags_A类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
开发者ID:saulhoward,项目名称:haddock-cms,代码行数:7,代码来源:DBPages_AdminHelper.inc.php
示例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;
}
开发者ID:saulhoward,项目名称:haddock-cms,代码行数:26,代码来源:RSS_RSSHelper.inc.php
示例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);
}
}
开发者ID:saulhoward,项目名称:haddock-cms,代码行数:32,代码来源:Admin_ModuleLinksUL.inc.php
示例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;
}
开发者ID:saulhoward,项目名称:haddock-cms,代码行数:28,代码来源:UserLogin_DisplayHelper.inc.php
示例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;
}
开发者ID:saulhoward,项目名称:haddock-cms,代码行数:12,代码来源:OrderedTables_AdminCRUDHelper.inc.php
示例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);
}
开发者ID:saulhoward,项目名称:haddock-cms,代码行数:12,代码来源:Database_SortableHeadingTR.inc.php
示例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;
}
开发者ID:saulhoward,项目名称:oedipus-decision-maker,代码行数:10,代码来源:Oedipus_FrameImageHelper.inc.php
示例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;
}
开发者ID:saulhoward,项目名称:oedipus-decision-maker,代码行数:10,代码来源:Oedipus_DramaToolBarUL.inc.php
示例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;
}
开发者ID:saulhoward,项目名称:oedipus-decision-maker,代码行数:10,代码来源:Oedipus_FrameOptionsUL.inc.php
示例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;
}
开发者ID:saulhoward,项目名称:oedipus-decision-maker,代码行数:10,代码来源:Oedipus_EditFrameOptionActionsUL.inc.php
示例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;
}
开发者ID:saulhoward,项目名称:haddock-cms,代码行数:10,代码来源:VideoLibrary_AdminHelper.inc.php
示例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;
}
开发者ID:saulhoward,项目名称:oedipus-decision-maker,代码行数:10,代码来源:Oedipus_EditFrameFrameActionsUL.inc.php
示例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;
}
开发者ID:saulhoward,项目名称:haddock-cms,代码行数:11,代码来源:TrackitStockManagement_ProductRowRenderer.inc.php
示例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;
}
开发者ID:saulhoward,项目名称:oedipus-decision-maker,代码行数:11,代码来源:Oedipus_ShareDramaToolBarUL.inc.php
示例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();
}
开发者ID:saulhoward,项目名称:haddock-cms,代码行数:11,代码来源:VideoLibrary_ManageExternalVideosAdminPage.inc.php
示例16: get_drama_tr
private function get_drama_tr(Oedipus_Drama $drama)
{
$tr = new HTMLTags_TR();
//$tr->set_attribute_str('id', 'drama');
$link = new HTMLTags_A($drama->get_name());
$link->set_href($this->get_drama_page_url_for_drama($drama));
$name_td = $this->get_td_with_id($link->get_as_string(), 'name');
$tr->append($name_td);
$added_td = $this->get_td_with_id($drama->get_human_readable_added(), 'added');
$tr->append($added_td);
return $tr;
}
开发者ID:saulhoward,项目名称:oedipus-decision-maker,代码行数:12,代码来源:Oedipus_DramaListDiv.inc.php
示例17: get_admin_users_td
private function get_admin_users_td($a_text, $admin_page)
{
$user_row = $this->get_element();
$td = new HTMLTags_TD();
$confirm_url = Admin_AdminIncluderURLFactory::get_url('haddock', 'admin', $admin_page, 'html');
$confirm_url->set_get_variable('user_id', $user_row->get_id());
$a = new HTMLTags_A($a_text);
$a->set_href($confirm_url);
$a->set_attribute_str('class', 'cool_button');
$td->append_tag_to_content($a);
return $td;
}
开发者ID:saulhoward,项目名称:haddock-cms,代码行数:12,代码来源:UserLogin_UserRowRenderer.inc.php
示例18: get_other_page_link_as
protected function get_other_page_link_as()
{
$as = array();
/**
* Link to the reset all confirmation page.
*/
$delete_all_a = new HTMLTags_A($this->get_delete_everything_link_text());
$delete_all_href = $this->get_current_base_url();
$delete_all_href->set_get_variable('content', 'delete_everything');
$delete_all_a->set_href($delete_all_href);
$as[] = $delete_all_a;
return $as;
}
开发者ID:saulhoward,项目名称:haddock-cms,代码行数:13,代码来源:FeedAggregator_ManageRetrievalQueueAdminPage.inc.php
示例19: get_top_links_as
protected function get_top_links_as()
{
$as = array();
$top_links = $this->reorder_table_admin_page_config_file->get_top_links();
#print_r($top_links);
foreach ($top_links as $top_link) {
$a = new HTMLTags_A($top_link['title']);
$a->set_href(new HTMLTags_URL($top_link['url']));
$as[] = $a;
}
#print_r($as);
return $as;
}
开发者ID:saulhoward,项目名称:haddock-cms,代码行数:13,代码来源:OrderedTables_ReorderTableAdminPageManager.inc.php
示例20: 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;
}
开发者ID:saulhoward,项目名称:haddock-cms,代码行数:56,代码来源:Shop_ProductTagsTableRenderer.inc.php
注:本文中的HTMLTags_A类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论