Example #1
0
File: Tr.php Project: broozer/psa
 function build()
 {
     if (!Table::$tbody_set) {
         $this->html = '<tbody';
         if ($this->_tbodyId != '') {
             $this->html .= ' id="' . $this->_tbodyId . '"';
         }
         $this->html .= ">";
         Table::$tbody_set = TRUE;
     }
     if ($this->_globalClass == '') {
         $this->html .= "<tr>";
     } else {
         $this->html .= '<tr class="' . $this->_globalClass . '">';
     }
     for ($i = 0; $i < sizeof($this->_array); ++$i) {
         $this->html .= '<td';
         if (isset($this->_array[$i]['id'])) {
             $this->html .= ' id="' . $this->_array[$i]['id'] . '"';
         }
         if (isset($this->_array[$i]['class'])) {
             $this->html .= ' class="' . $this->_array[$i]['class'] . '"';
         }
         if (trim($this->_array[$i]['name']) == '') {
             $this->_array[$i]['name'] = '&nbsp;';
         }
         $this->html .= '>' . $this->_array[$i]['name'] . "</td>";
     }
     $this->html .= "</tr>" . "\r\n";
     $this->display();
 }
Example #2
0
 function __destruct()
 {
     $this->html = "</tbody></table>";
     self::$tbody_set = FALSE;
     $this->display();
 }