public function renderContents($writer) { if (($text = $this->getText()) === '' && $this->getHasControls()) { $htmlWriter = Prado::createComponent($this->GetResponse()->getHtmlWriterType(), new TTextWriter()); parent::renderContents($htmlWriter); $text = $htmlWriter->flush(); } if ($text !== '') { $writer->write($this->processText($text)); } }