public function AddRow() { $cells = func_get_args(); if (func_num_args() < 1) { $this->error_manager->ShowError('Function $class->addRow() should get at least one argument.'); } if ($this->body_begin) { $GridRow = new TGrid_TTR(); foreach ($cells as $cell) { $GridRow->Add(new TGrid_TTD($cell)); } $this->grid .= $GridRow->Html(); } else { $this->error_manager->ShowError('The body should be initialized before adding rows. ( use $class->beginBody() )'); } }