Example #1
0
 /**
  * Renders the openning tag for the datagrid control which will render table caption if present.
  * @param THtmlWriter the writer used for the rendering purpose
  */
 public function renderBeginTag($writer)
 {
     parent::renderBeginTag($writer);
     if (($caption = $this->getCaption()) !== '') {
         if (($align = $this->getCaptionAlign()) !== TTableCaptionAlign::NotSet) {
             $writer->addAttribute('align', strtolower($align));
         }
         $writer->renderBeginTag('caption');
         $writer->write($caption);
         $writer->renderEndTag();
     }
 }