setVerticalAlignmentForCellRange() public method

sets vertical alignment to cells of a given cell range
public setVerticalAlignmentForCellRange ( string $verticalAlignment, integer $startRow, integer $startColumn, integer $endRow = null, integer $endColumn = null )
$verticalAlignment string Vertical alignment of cell (default top). Represented by PHPRtfLite_Container::VERTICAL_ALIGN_*
Possible values:
PHPRtfLite_Container::VERTICAL_ALIGN_TOP => 'top' - top alignment;
PHPRtfLite_Container::VERTICAL_ALIGN_CENTER => 'center' - center alignment;
PHPRtfLite_Container::VERTICAL_ALIGN_BOTTOM => 'bottom' - bottom alignment.
$startRow integer start row
$startColumn integer start column
$endRow integer end row, if null, then vertical alignment is set only to the row range.
$endColumn integer end column, if null, then vertical alignment is set just to the column range.
Beispiel #1
0
 /**
  * tests setVerticalAlignmentForCellRange
  */
 public function testSetVerticalAlignmentForCell()
 {
     $this->_table->addRows(3);
     $this->_table->addColumnsList(array(5, 5, 5));
     $this->_table->setVerticalAlignmentForCellRange(PHPRtfLite_Table_Cell::VERTICAL_ALIGN_CENTER, 2, 2);
     $cell = $this->_table->getCell(2, 2);
     $this->assertEquals(PHPRtfLite_Table_Cell::VERTICAL_ALIGN_CENTER, $cell->getVerticalAlignment());
 }