Exemple #1
0
 public function bodyToString()
 {
     parent::bodyToString();
     $tbl = new CTable(NULL, $this->tableclass);
     foreach ($this->top_items as $item) {
         $tbl->additem($item);
     }
     $tbl->setOddRowClass('form_odd_row');
     $tbl->setEvenRowClass('form_even_row');
     $tbl->setCellSpacing(0);
     $tbl->setCellPadding(1);
     $tbl->setAlign($this->align);
     // add first row
     if (!is_null($this->title)) {
         $col = new CCol(NULL, 'form_row_first');
         $col->setColSpan(2);
         if (isset($this->help)) {
             $col->addItem($this->help);
         }
         if (isset($this->title)) {
             $col->addItem($this->title);
         }
         $tbl->setHeader($col);
     }
     // add last row
     $tbl->setFooter($this->bottom_items);
     // add center rows
     foreach ($this->center_items as $item) {
         $tbl->addRow($item);
     }
     return $tbl->toString();
 }