protected function generar_layout() { if (!$this->cambiar_layout) { parent::generar_layout(); } else { echo '<table>'; $i = 0; foreach ($this->get_nombres_ef() as $ef) { $ultimo = $i == $this->get_cantidad_efs(); if ($i % 2 == 0) { echo '<tr>'; } echo '<td>'; //--- Llamada a la generacion estandar de un ef $this->generar_html_ef($ef); echo '</td>'; $i++; if ($i % 2 == 0 || $ultimo) { echo '</tr>'; } } echo '</table>'; } }