Example #1
0
 /**
  * Adds the header row to the table based on the header decorators
  * @return null
  */
 protected function addHeader()
 {
     if (!$this->hasHeaderDecorators) {
         return;
     }
     $row = new Row();
     $row->appendToClass(self::STYLE_HEADER);
     foreach ($this->columnDecorators as $columnDecorator) {
         $cell = new HeaderCell();
         $headerDecorator = $columnDecorator->getHeaderDecorator();
         if ($headerDecorator) {
             $headerDecorator->decorate($cell, $row, 0, array());
         }
         $row->addCell($cell);
     }
     parent::setHeader($row);
 }