* @var object Tabla
* @access private
*/
- var $_tabla;
+ var $tabla;
/**
* HTML con los scripts para poner antes del formulario (tipicamente
$this->setTable($param);
}
else {
- $this->_tabla =& new MECON_HTML_Tabla($param);
+ $this->tabla =& new MECON_HTML_Tabla($param);
}
} // end constructor
function toHtml()
{
return $this->_script . $this->_prepend .
- $this->_tabla->toHtml() .
+ $this->tabla->toHtml() .
$this->_append;
} // end func toHtml
{
// add a required note, if one is needed
if (!empty($form->_required) && !$form->_freezeAll) {
- $id = $this->_tabla->addRow(
+ $id = $this->tabla->addRow(
array('<font size="-2">'.$form->getRequiredNote().'</font>'),
array('colspan' => 2, 'cabecera' => true)
);
- //$this->_tabla->updateCellAttributes($id, array('colspan' => 2));
+ //$this->tabla->updateCellAttributes($id, array('colspan' => 2));
}
// add form attributes and content
//$this->_html = str_replace('{content}', $this->_html, $html);
function renderHeader(&$header)
{
$name = $header->getName();
- $this->_tabla->addRow(
+ $this->tabla->addRow(
array($header->toHtml()),
array('colspan' => 2, $name => true)
);
function renderElement(&$element, $required, $error)
{
if (!$this->_inGroup) {
- $id = $this->_tabla->addRow(
+ $id = $this->tabla->addRow(
array(
$element->getLabel() . ($required ? '<font color="red">*</FONT>' : ''),
$element->toHtml() . ($error ? "<br><font color=\"red\">$error</FONT>" : ''),
)
);
- $this->_tabla->updateCellAttributes($id, 0, array('titulo' => true, 'align' => 'left'));
- $this->_tabla->updateCellAttributes($id, 1, array('align' => 'left'));
+ $this->tabla->updateCellAttributes($id, 0, array('titulo' => true, 'align' => 'left'));
+ $this->tabla->updateCellAttributes($id, 1, array('align' => 'left'));
} else {
$this->_groupElements[] = ($element->getLabel() ? ($element->getLabel().' ') : '') . $element->toHtml();
}
*/
function renderHtml(&$data)
{
- $this->_tabla->addRow(
+ $this->tabla->addRow(
array($header->toHtml()),
array('colspan' => 2)
);
$name = $group->getName();
$sep = $group->_separator;
if (strtolower($name) == 'botones') {
- $id = $this->_tabla->addRow(
+ $id = $this->tabla->addRow(
array(join('', $this->_groupElements))
);
- $this->_tabla->updateCellAttributes($id, 0, array('valign' => 'middle', 'align' => 'center', 'colspan' => 2));
+ $this->tabla->updateCellAttributes($id, 0, array('valign' => 'middle', 'align' => 'center', 'colspan' => 2));
} else {
- $id = $this->_tabla->addRow(
+ $id = $this->tabla->addRow(
array($group->getLabel(), join($sep, $this->_groupElements)),
array('valign' => 'middle', 'align' => 'left')
);
- $this->_tabla->updateCellAttributes($id, 0, array('titulo' => true, 'align' => 'left'));
+ $this->tabla->updateCellAttributes($id, 0, array('titulo' => true, 'align' => 'left'));
}
$this->_inGroup = false;
} // end func finishGroup
/**
- *
+ * Actualiza atributos de la tabla interna.
*
* @param mixed $attrs Html attributes
* @access public
* @return void
+ * @deprecated Usar $renderer->tabla->updateAttributes().
*/
function updateAttributes($attrs) {
- $this->_tabla->updateAttributes($attrs);
+ $this->tabla->updateAttributes($attrs);
}
/**
- *
+ * Setea atributos.
*
* @param mixed $attrs Html attributes
* @access public
* @return void
+ * @deprecated Usar $renderer->tabla->setAttributes().
*/
function setAttributes($attrs) {
- $this->_tabla->setAttributes($attrs);
+ $this->tabla->setAttributes($attrs);
}
/**
- *
+ * Obtiene atributos.
*
* @access public
* @return mixed
+ * @deprecated Usar $renderer->tabla->getAttributes().
*/
function getAttributes() {
- return $this->_tabla->getAttributes();
+ return $this->tabla->getAttributes();
+ }
+
+ /**
+ * Setea la tabla que utilizará el renderer.
+ *
+ * @param Tabla $param Objeto tabla alternativo para utilizar
+ *
+ * @access public
+ *
+ * @deprecated Usar $renderer->tabla.
+ */
+ function setTable(&$param) {
+ $this->tabla =& $param;
}
/**
* @access public
*/
function setTable($param) {
- $this->_tabla =& $param;
+ $this->tabla =& $param;
}
function getCSS() {
- return $this->_tabla->getCSS();
+ return $this->tabla->getCSS();
}
} // end class HTML_QuickForm_Renderer_Default