public static function get_1d_ol($tree_name, $class_name = NULL)
 {
     if (!isset($class_name)) {
         $class_name = 'navigation';
     }
     $nodes = Navigation_1DTreeRetriever::get_tree_nodes($tree_name);
     #print_r($nodes);
     #echo "<ul class=\"$class_name\">\n";
     $ul = new HTMLTags_OL();
     $ul->set_class($class_name);
     foreach ($nodes as $node) {
         #Navigation_NodeRenderer::render_node($node);
         $li = new HTMLTags_LI();
         $li->append(Navigation_NodesHelper::get_link_a($node));
         $ul->add_li($li);
     }
     return $ul;
 }
 protected function get_content()
 {
     $content = new HTMLTags_TagContent();
     # The field set.
     $field_set = new HTMLTags_FieldSet();
     $field_set->append_tag_to_content($this->get_legend());
     $inputs_list = new HTMLTags_OL();
     $input_lis = $this->get_input_lis();
     if (count($input_lis) > 0) {
         foreach ($input_lis as $input_li) {
             $inputs_list->add_li($input_li);
         }
     } else {
         throw new Exception('No inputs set in HTMLTags_SimpleOLForm!');
     }
     $field_set->append_tag_to_content($inputs_list);
     $content->append_tag($field_set);
     foreach ($this->get_hidden_inputs() as $hidden_input) {
         $content->append_tag($hidden_input);
     }
     $submit_buttons_div = new HTMLTags_Div();
     $submit_buttons_div->set_attribute_str('class', 'submit_buttons_div');
     $submit_buttons_div->append_tag_to_content($this->get_submit_button());
     $submit_buttons_div->append_tag_to_content($this->get_cancel_button());
     $content->append_tag($submit_buttons_div);
     # The content
     return $content;
 }
             if (isset($database_class_name_file)) {
                 if ($database_class_name_file->has_field_renderer_class_file($table_name, $field_name)) {
                     $current_field_renderer_class_file = $database_class_name_file->get_field_renderer_class_file($table_name, $field_name);
                 }
             }
             foreach ($field_renderer_files[$table_name][$field_name] as $field_renderer_class_file) {
                 $field_renderer_class_relative_filename = $field_renderer_class_file->get_name_relative_to_dir(PROJECT_ROOT);
                 $option = new HTMLTags_Option($field_renderer_class_file->get_php_class_name());
                 $option->set_attribute_str('value', $field_renderer_class_relative_filename);
                 if ($field_renderer_class_file->equals($current_field_renderer_class_file)) {
                     $option->set_attribute_str('selected');
                 }
                 $field_renderer_select->add_option($option);
             }
             $field_renderer_li->append_tag_to_content($field_renderer_select);
             $table_fields_list->add_li($field_renderer_li);
         }
         $table_li->append_tag_to_content($table_fields_list);
         $field_renderers_list->append_tag_to_content($table_li);
     }
     $d_c_n_c_field_set->append_tag_to_content($field_renderers_list);
 }
 /*
  * -------------------------------------------------------------------------
  */
 $d_c_n_c_form->append_tag_to_content($d_c_n_c_field_set);
 $commit_button = new HTMLTags_Input();
 $commit_button->set_attribute_str('type', 'submit');
 $commit_button->set_attribute_str('value', 'Commit');
 $commit_button->set_attribute_str('class', 'submit');
 $d_c_n_c_form->append_tag_to_content($commit_button);
 protected function get_content()
 {
     $content = new HTMLTags_TagContent();
     /* 
      * The Inputs
      */
     $inputs_list = new HTMLTags_OL();
     $input_lis = $this->get_input_lis();
     if (count($input_lis) > 0) {
         foreach ($input_lis as $input_li) {
             $inputs_list->add_li($input_li);
         }
     } else {
         throw new Exception('No inputs set in HTMLTags_SimpleOLForm!');
     }
     $content->append_tag($inputs_list);
     /*
      * The buttons
      */
     $submit_buttons_div = new HTMLTags_Div();
     $submit_buttons_div->set_attribute_str('class', 'submit_buttons_div');
     $submit_buttons_div->append_tag_to_content($this->get_submit_button());
     $content->append_tag($submit_buttons_div);
     /*
      * The hidden inputs.
      */
     foreach ($this->get_hidden_inputs() as $hidden_input) {
         $content->append_tag($hidden_input);
     }
     return $content;
 }
 foreach ($possible_statuses as $possible_status) {
     $possible_status_option = new HTMLTags_Option($possible_status);
     $possible_status_option->set_attribute_str('value', $possible_status);
     if (isset($_GET['status'])) {
         if ($possible_status == $_GET['status']) {
             $possible_status_option->set_attribute_str('selected');
         }
     } elseif (!isset($_GET['status'])) {
         if ($possible_status == 'paid') {
             $possible_status_option->set_attribute_str('selected');
         }
     }
     $status_select->add_option($possible_status_option);
 }
 $status_li->append_tag_to_content($status_select);
 $inputs_ol->add_li($status_li);
 /*
  * The hidden inputs.
  */
 $order_status_selecting_action_get_vars = $order_status_selecting_action->get_get_variables();
 foreach (array_keys($order_status_selecting_action_get_vars) as $key) {
     $form_hidden_input = new HTMLTags_Input();
     $form_hidden_input->set_attribute_str('type', 'hidden');
     $form_hidden_input->set_attribute_str('name', $key);
     $form_hidden_input->set_attribute_str('value', $order_status_selecting_action_get_vars[$key]);
     $order_status_selecting_form->append_tag_to_content($form_hidden_input);
 }
 /*
  * The submit button.
  */
 $go_button_li = new HTMLTags_LI();
 private function get_enter_plu_code_form()
 {
     $enter_plu_code_form = new HTMLTags_Form();
     $enter_plu_code_form->set_attribute_str('name', 'enter_plu_code');
     $enter_plu_code_form->set_attribute_str('method', 'GET');
     $enter_plu_code_form->set_attribute_str('class', 'table-select-form');
     $enter_plu_code_form->set_action(new HTMLTags_URL('/'));
     $inputs_ol = new HTMLTags_OL();
     /*
      * Select whether you want all products or just those with status==display
      */
     $li = new HTMLTags_LI();
     $label = new HTMLTags_Label('PLU Code');
     $label->set_attribute_str('for', 'plu_code');
     $li->append_tag_to_content($label);
     $input = new HTMLTags_Input();
     $input->set_attribute_str('name', 'plu_code');
     $li->append($input);
     $inputs_ol->append($li);
     /*
      * The submit button.
      */
     $go_button_li = new HTMLTags_LI();
     $go_button = new HTMLTags_Input();
     $go_button->set_attribute_str('type', 'submit');
     $go_button->set_attribute_str('value', 'Go');
     $go_button->set_attribute_str('class', 'submit');
     $go_button_li->append_tag_to_content($go_button);
     $inputs_ol->add_li($go_button_li);
     $enter_plu_code_form->append($inputs_ol);
     /*
      * The hidden inputs.
      */
     $current_page_url = $this->get_current_page_url();
     $enter_plu_code_action = clone $current_page_url;
     $enter_plu_code_action_get_vars = $enter_plu_code_action->get_get_variables();
     foreach (array_keys($enter_plu_code_action_get_vars) as $key) {
         $form_hidden_input = new HTMLTags_Input();
         $form_hidden_input->set_attribute_str('type', 'hidden');
         $form_hidden_input->set_attribute_str('name', $key);
         $form_hidden_input->set_attribute_str('value', $enter_plu_code_action_get_vars[$key]);
         $enter_plu_code_form->append_tag_to_content($form_hidden_input);
     }
     return $enter_plu_code_form;
 }
 $product_category_label = new HTMLTags_Label('Product Category');
 $product_category_label->set_attribute_str('for', 'product_category_id');
 $product_category_li->append_tag_to_content($product_category_label);
 if (isset($_GET['product_category_id'])) {
     $product_category_form_select = $table_renderer->get_product_category_form_select($_GET['product_category_id']);
 } else {
     $product_category_form_select = $table_renderer->get_product_category_form_select();
 }
 $all_product_categories_option = new HTMLTags_Option('all');
 $all_product_categories_option->set_attribute_str('value', 'all');
 if ($_GET['product_category_id'] == 'all' || !isset($_GET['product_category_id'])) {
     $all_product_categories_option->set_attribute_str('selected');
 }
 $product_category_form_select->add_option($all_product_categories_option);
 $product_category_li->append_tag_to_content($product_category_form_select);
 $inputs_ol->add_li($product_category_li);
 /*
  * The hidden inputs.
  */
 $product_category_selecting_action_get_vars = $product_category_selecting_action->get_get_variables();
 foreach (array_keys($product_category_selecting_action_get_vars) as $key) {
     $form_hidden_input = new HTMLTags_Input();
     $form_hidden_input->set_attribute_str('type', 'hidden');
     $form_hidden_input->set_attribute_str('name', $key);
     $form_hidden_input->set_attribute_str('value', $product_category_selecting_action_get_vars[$key]);
     $product_category_selecting_form->append_tag_to_content($form_hidden_input);
 }
 /*
  * The submit button.
  */
 $go_button_li = new HTMLTags_LI();