public function addHeader() {
        $height = $this->getRowHeight();
        $definition = $this->rowDefinition;

        $this->copyDefaultColumnDefinitions(null);
        if ($this->trigger(self::EV_HEADER_ADD) !== false) {
            foreach ($this->columnDefinition as $key => $def) {
                $this->addCell($key, $def['header'], $this->columnDefinition, true);
            }
            $this->trigger(self::EV_HEADER_ADDED);
        }
        // reset row definition, because headers also copy their own column
        // definition and override the data row definition already done before
        // this method is called
        $this->setRowHeight($height);
        $this->rowDefinition = $definition;
        return $this;
    }
public function addHeader() {
        $height = $this->getRowHeight();
        $definition = $this->rowDefinition;

        $this->copyDefaultColumnDefinitions(null);
        if ($this->trigger(self::EV_HEADER_ADD) !== false) {
            foreach ($this->columnDefinition as $key => $def) {
                $this->addCell($key, $def['header'], $this->columnDefinition, true);
            }
            $this->trigger(self::EV_HEADER_ADDED);
        }
        // reset row definition, because headers also copy their own column
        // definition and override the data row definition already done before
        // this method is called
        $this->setRowHeight($height);
        $this->rowDefinition = $definition;
        return $this;
    }
public function addHeader ( ) { $ height = $ this -> getRowHeight ( ) ; $ definition = $ this -> rowDefinition ; $ this -> copyDefaultColumnDefinitions ( null ) ; if ( $ this -> trigger ( self :: EV_HEADER_ADD ) !== false ) { foreach ( $ this -> columnDefinition as $ key => $ def ) { $ this -> addCell ( $ key , $ def [ 'header' ] , $ this -> columnDefinition , true ) ; } $ this -> trigger ( self :: EV_HEADER_ADDED ) ; } // reset row definition, because headers also copy their own column // definition and override the data row definition already done before // this method is called $ this -> setRowHeight ( $ height ) ; $ this -> rowDefinition = $ definition ; return $ this ; }
Add table headers

@return TcTable
Add table headers