structure = new SimpleXMLElement($xml); } /** * Adds focus to a given key * * @param string Key */ public function addFocus($key) { $this->focusKeys[] = $key; } /** * Adds a section to display. The order in which sections are added is the order * in which they are painted * * @param string Key */ public function addSection($key) { $this->displaySections[] = $key; } /** * Generates the header HTML that is called in BSPrinterRootElementPage * to setup the navigation frame * * @return string Generated HTML content */ public function constructHeaderHtml() { $output = '' . "\n\n"; // ------------------------------------------------------------------- $output2 = array(); foreach ($this->structure->links->link as $link) { $attrs = $link->attributes(); $output2[] = '' . $link . ''; } $output .= "\n" . ''; // ------------------------------------------------------------------- $output .= "\n\n" . '
'; // ------------------------------------------------------------------- $output .= "\n" . '
'; foreach ($this->structure->tabs->tab as $tab) { $link = "\n\t" . 'focusKeys)) { $link .= ' id="focustab"'; } $link .= '>' . $tab . ''; $output .= $link; } $output .= "\n" . '
'; // ------------------------------------------------------------------- $output .= "\n\n" . ''; $output .= "\n" . ''; // ------------------------------------------------------------------- $output .= "\n" . ''; // ------------------------------------------------------------------- $output .= "\n" . ''; $output .= "\n" . ''; $output .= "\n\n" . '
'; $output .= "\n\n" . '' . "\n"; return $output; } /** * Generates the HTML that is inserted in BSPrinterRootElementPage that * closes all of the navigation HTML stuff * * @return string Generated HTML content */ public function constructFooterHtml() { $output = ''; $output .= "\n" . '' . "\n"; $output .= "\n" . '
'; $output .= "\n\n" . '
'; return $output; } } ?>