public function PHPExcel_Style_Font::setColor in Loft Data Grids 6.2
Same name and namespace in other branches
- 7.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Style/Font.php \PHPExcel_Style_Font::setColor()
* Set Color * *
Parameters
PHPExcel_Style_Color $pValue: * @throws PHPExcel_Exception * @return PHPExcel_Style_Font
File
- vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Style/ Font.php, line 496
Class
- PHPExcel_Style_Font
- PHPExcel_Style_Font
Code
public function setColor(PHPExcel_Style_Color $pValue = null) {
// make sure parameter is a real color and not a supervisor
$color = $pValue
->getIsSupervisor() ? $pValue
->getSharedComponent() : $pValue;
if ($this->_isSupervisor) {
$styleArray = $this
->getColor()
->getStyleArray(array(
'argb' => $color
->getARGB(),
));
$this
->getActiveSheet()
->getStyle($this
->getSelectedCells())
->applyFromArray($styleArray);
}
else {
$this->_color = $color;
}
return $this;
}