+ $this->_cuerpo[] = $content;
+ }
+
+ function toHtml()
+ {
+ $table = new HTML_Table(array('border' => 0, 'cellspacing' => 0, 'cellpadding' => 0));
+ $copete =& new HTML_Copete($this->_copete_seccion);
+ $copete->setTitulo($this->_copete_titulo);
+ $this->addStyleSheet($copete->getCSS());
+ $table->addRow(array($copete));
+ $table->addRow(array(' '));
+ $table->addRow(array($this->_arrayToHtml($this->_cuerpo)));
+ parent::addBodyContent($table);
+ return parent::toHtml();
+ }
+
+ function _arrayToHtml(&$array)
+ {
+ // Robado de HTML_Page.
+ $lnEnd = $this->_getLineEnd();
+ $tab = $this->_getTab();
+ $strHtml = '';
+ foreach ($array as $element) {
+ if (is_object($element)) {
+ if (is_subclass_of($element, 'html_common')) {
+ $element->setTabOffset(1);
+ $element->setTab($tab);
+ $element->setLineEnd($lnEnd);
+ }
+ if (is_object($element)) {
+ if (method_exists($element, 'toHtml')) {
+ $strHtml .= $element->toHtml() . $lnEnd;
+ } elseif (method_exists($element, 'toString')) {
+ $strHtml .= $element->toString() . $lnEnd;
+ }
+ } else {
+ $strHtml .= $tab . $element . $lnEnd;
+ }
+ } elseif (is_array($element)) {
+ $strHtml .= $this->_arrayToHtml($element);
+ } else {
+ $strHtml .= $tab . $element . $lnEnd;
+ }
+ }
+ return $strHtml;