本文整理汇总了PHP中HTMLTags_Div::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP HTMLTags_Div::__construct方法的具体用法?PHP HTMLTags_Div::__construct怎么用?PHP HTMLTags_Div::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HTMLTags_Div
的用法示例。
在下文中一共展示了HTMLTags_Div::__construct方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct()
{
parent::__construct();
$this->set_dramas($this->get_dramas_list());
$this->set_attribute_str('class', 'dramas');
$this->append($this->get_drama_table());
}
示例2: __construct
public function __construct($item_reviewed, $review, $reviewer, $date_reviewed)
{
parent::__construct();
$this->set_attribute_str('class', 'hreview');
$item_div = new HTMLTags_Div();
$item_div->set_attribute_str('class', 'item');
$item_div->append_str_to_content($item_reviewed);
$this->append_tag_to_content($item_div);
$description_div = new HTMLTags_Div();
$description_div->set_attribute_str('class', 'description');
$description_p = new HTMLTags_P($review);
$description_div->append_tag_to_content($description_p);
$this->append_tag_to_content($description_div);
$reviewer_vcard_span = new HTMLTags_Span();
$reviewer_vcard_span->set_attribute_str('class', 'reviewer vcard');
$reviewer_fn_span = new HTMLTags_Span();
$reviewer_fn_span->set_attribute_str('class', 'fn');
$reviewer_fn_span->append_str_to_content($reviewer);
$reviewer_vcard_span->append_tag_to_content($reviewer_fn_span);
$random_br_tag = new HTMLTags_BR();
$reviewer_vcard_span->append_tag_to_content($random_br_tag);
$date_reviewed_abbr = new HTMLTags_Abbr();
$date_reviewed_abbr->set_attribute_str('class', 'dtreviewed');
$datetime_iso8601 = Formatting_DateTime::datetime_to_ISO8601($date_reviewed);
$date_reviewed_abbr->set_attribute_str('title', $datetime_iso8601);
$datetime_human_readable = Formatting_DateTime::datetime_to_human_readable($date_reviewed);
$date_reviewed_abbr->append_str_to_content($datetime_human_readable);
$reviewer_vcard_span->append_tag_to_content($date_reviewed_abbr);
$this->append_tag_to_content($reviewer_vcard_span);
return $this;
}
示例3: __construct
public function __construct(HTMLTags_Tag $fluid_box_content, $style = 'text_box')
{
parent::__construct();
$this->set_attribute_str('class', 'dialog_black');
$this->set_attribute_str('id', $style);
$fluid_box_hd = new HTMLTags_Div();
$fluid_box_hd->set_attribute_str('class', 'hd');
$fluid_box_hd_c = new HTMLTags_Div();
$fluid_box_hd_c->set_attribute_str('class', 'c');
$fluid_box_hd->append_tag_to_content($fluid_box_hd_c);
$this->append_tag_to_content($fluid_box_hd);
$fluid_box_bd = new HTMLTags_Div();
$fluid_box_bd->set_attribute_str('class', 'bd');
$fluid_box_c = new HTMLTags_Div();
$fluid_box_c->set_attribute_str('class', 'c');
$fluid_box_s = new HTMLTags_Div();
$fluid_box_s->set_attribute_str('class', 's');
$fluid_box_s->append_tag_to_content($fluid_box_content);
$fluid_box_c->append_tag_to_content($fluid_box_s);
$fluid_box_bd->append_tag_to_content($fluid_box_c);
$this->append_tag_to_content($fluid_box_bd);
$fluid_box_ft = new HTMLTags_Div();
$fluid_box_ft->set_attribute_str('class', 'ft');
$fluid_box_ft_c = new HTMLTags_Div();
$fluid_box_ft_c->set_attribute_str('class', 'c');
$fluid_box_ft->append_tag_to_content($fluid_box_ft_c);
$this->append_tag_to_content($fluid_box_ft);
return $this;
}
示例4: __construct
public function __construct(Oedipus_Frame $frame)
{
// print_r($frame);exit;
parent::__construct();
$this->set_frame($frame);
# The left and right column divs
$left_div = new HTMLTags_Div();
$left_div->set_attribute_str('class', 'left-column');
# The frame itself
$left_div->append_tag_to_content($this->get_oedipus_frame_div());
# The previous and next frames
$left_div->append_tag_to_content($this->get_frame_navigation_div());
# The forms to edit names, add characters and options
if ($this->get_frame()->is_editable()) {
$left_div->append($this->get_oedipus_frame_editor_forms_div());
}
$this->append_tag_to_content($left_div);
$right_div = new HTMLTags_Div();
$right_div->set_attribute_str('class', 'right-column');
# The notes etc. added here
$right_div->append_tag_to_content($this->get_frame_notes_div());
$this->append_tag_to_content($right_div);
$clear_div = new HTMLTags_Div();
$clear_div->set_attribute_str('class', 'clear-columns');
$this->append_tag_to_content($clear_div);
}
示例5: __construct
public function __construct(Oedipus_Scene $scene)
{
parent::__construct();
$this->set_scene($scene);
$this->set_attribute_str('class', 'scene');
$this->append($this->get_scene_content_div());
}
示例6: __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);
}
示例7: __construct
public function __construct(Exception $e, $print_name = FALSE, $print_trace = FALSE)
{
parent::__construct();
$this->set_attribute_str('id', 'exception');
/*
* The exception class p.
*/
if ($print_name) {
$this->append_tag_to_content(new HTMLTags_P(get_class($e)));
}
/*
* The exception message p.
*/
$this->append_tag_to_content(new HTMLTags_P($e->getMessage()));
/*
* The exception's trace list.
*/
if ($print_trace) {
$trace_list = new HTMLTags_OL();
$trace_list->set_attribute_str('id', 'trace-list');
foreach ($e->getTrace() as $data) {
$trace_item = new HTMLTags_LI();
#print_r($location);
foreach (array_keys($data) as $key) {
$trace_item->append_str_to_content("{$key}:");
#$trace_item->append_tag_to_content(new HTMLTags_BR());
if (is_array($data[$key])) {
foreach ($data[$key] as $datum) {
$trace_item->append_str_to_content(' ');
if (is_numeric($datum) || is_string($datum)) {
$trace_item->append_str_to_content('"' . $datum . '"');
}
$trace_item->append_tag_to_content(new HTMLTags_BR());
}
} else {
if (strtolower($key) == 'file') {
$formatted_filename = new Formatting_FileName($data[$key]);
$formatted_filename_pre = new HTMLTags_Pre($formatted_filename->get_pretty_name());
$trace_item->append_tag_to_content($formatted_filename_pre);
$trace_item->append_tag_to_content(new HTMLTags_BR());
} else {
$trace_item->append_str_to_content(' ');
#echo $data[$key];
#print_r($data[$key]);
$trace_item->append_str_to_content('' . $data[$key]);
$trace_item->append_tag_to_content(new HTMLTags_BR());
}
}
}
$trace_list->append_tag_to_content($trace_item);
}
$this->append_tag_to_content($trace_list);
}
}
示例8: __construct
public function __construct(Oedipus_Drama $drama)
{
parent::__construct();
$this->set_drama($drama);
$this->set_attribute_str('class', 'drama');
//$this->append_tag_to_content(
//$this->get_drama_heading($drama)
//);
if (isset($_GET['return_message'])) {
//print_r($_GET);exit;
$this->append($this->get_message_div($_GET['return_message']));
}
$this->append($this->get_content_div());
}
示例9: __construct
public function __construct(HTMLTags_URL $url, Database_Table $table, $order_by, $direction, $offset, $limit, $limit_str, $rows_html_table_caption, $lpnd_class, $data_table_class, $fields, $actions)
{
parent::__construct();
$table_renderer = $table->get_renderer();
/*
* ----------------------------------------
* Check the inputs.
* ----------------------------------------
*/
/*
* ----------------------------------------
* Create the content.
* ----------------------------------------
*/
$limit_previous_next_div = new HTMLTags_Div();
$limit_previous_next_div->set_attribute_str('class', $lpnd_class);
/*
* To allow the user to set the number of extras to show at a time.
*/
$limit_action = clone $url;
$limit_action->delete_all_get_variables();
$limit_form = new Database_LimitForm($limit_action, $limit, $limit_str);
$get_vars = $url->get_get_variables();
foreach (array_keys($get_vars) as $key) {
$limit_form->add_hidden_input($key, $get_vars[$key]);
}
$limit_form->add_hidden_input('order_by', $order_by);
$limit_form->add_hidden_input('direction', $direction);
$limit_form->add_hidden_input('offset', $offset);
$limit_previous_next_div->append_tag_to_content($limit_form);
$previous_next_url = clone $url;
$previous_next_url->set_get_variable('order_by', $order_by);
$previous_next_url->set_get_variable('direction', $direction);
$row_count = $table->count_all_rows();
$previous_next_ul = new Database_PreviousNextUL($previous_next_url, $offset, $limit, $row_count);
$limit_previous_next_div->append_tag_to_content($previous_next_ul);
$this->append_tag_to_content($limit_previous_next_div);
# ------------------------------------------------------------------
/*
* The table.
*/
$rows_html_table = new HTMLTags_Table();
$rows_html_table->set_attribute_str('class', $data_table_class);
/*
* The caption.
*/
$caption = new HTMLTags_Caption($rows_html_table_caption);
$rows_html_table->append_tag_to_content($caption);
/*
* The Heading Row.
*/
$sort_href = clone $url;
$sort_href->set_get_variable('limit', $limit);
$heading_row = new Database_SortableHeadingTR($sort_href, $direction);
//if (isset($fields_str)) {
// $fields = array();
//
// foreach (explode(' ', $fields_str) as $field_name) {
// $fields[] = $table->get_field($field_name);
// }
//} else {
// $fields = $table->get_fields();
//}
foreach ($fields as $field) {
if ($field['sortable']) {
$heading_row->append_sortable_field_name($field['name']);
} else {
$heading_row->append_nonsortable_field_name($field['name']);
}
}
foreach ($actions as $action) {
$heading_row->append_tag_to_content($action['th']);
}
$rows_html_table->append_tag_to_content($heading_row);
# ------------------------------------------------------------------
/*
* Display the contents of the table.
*/
$rows = $table->get_all_rows($order_by, $direction, $offset, $limit);
foreach ($rows as $row) {
$row_renderer = $row->get_renderer();
$data_tr = new HTMLTags_TR();
foreach ($fields as $field) {
$field_td = self::get_html_table_cell_for_field($field, $row_renderer);
$data_tr->append_tag_to_content($field_td);
}
//foreach (
// $row_renderer->get_action_tds(
// $actions_str,
// $url
// )
// as
// $action_td
//) {
// $data_tr->append_tag_to_content($action_td);
//}
foreach ($actions as $action) {
$action_td = self::get_html_table_cell_for_field($action, $row_renderer);
$data_tr->append_tag_to_content($action_td);
}
//.........这里部分代码省略.........