public function PHPExcel_Style_Fill::setStartColor in Loft Data Grids 7.2
Same name and namespace in other branches
- 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Style/Fill.php \PHPExcel_Style_Fill::setStartColor()
* Set Start Color * *
Parameters
PHPExcel_Style_Color $pValue: * @throws PHPExcel_Exception * @return PHPExcel_Style_Fill
File
- vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Style/ Fill.php, line 261
Class
- PHPExcel_Style_Fill
- PHPExcel_Style_Fill
Code
public function setStartColor(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
->getStartColor()
->getStyleArray(array(
'argb' => $color
->getARGB(),
));
$this
->getActiveSheet()
->getStyle($this
->getSelectedCells())
->applyFromArray($styleArray);
}
else {
$this->_startColor = $color;
}
return $this;
}