Example #1
0
 /**
  *
  * @param DOMElement $element
  * @param PHPWord_Section_Table $table
  * @param array $cellStyle
  * @param array $fontStyle
  * @param array $paragraphStyle 
  */
 protected function _addCell($element, $table, $cellStyle = array(), $fontStyle = array(), $paragraphStyle = array())
 {
     $cellStyle += array('valign' => 'center', 'borderSize' => 10, 'borderColor' => 'DDDDDD');
     $fontStyle += array('size' => 10, 'name' => 'Arial');
     $paragraphStyle += array('align' => 'center', 'spaceBefore' => 50, 'spaceAfter' => 50);
     if ($element->hasAttribute('colspan')) {
         $cellStyle['gridSpan'] = $element->getAttribute('colspan');
     }
     $text = trim($element->nodeValue);
     $table->addCell(5000, $cellStyle)->addText($text, $fontStyle, $paragraphStyle);
 }