You are here

public function PHPExcel_Style_Fill::setEndColor in Loft Data Grids 7.2

Same name and namespace in other branches
  1. 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Style/Fill.php \PHPExcel_Style_Fill::setEndColor()

* Set End Color * *

Parameters

PHPExcel_Style_Color $pValue: * @throws PHPExcel_Exception * @return PHPExcel_Style_Fill

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/Style/Fill.php, line 290

Class

PHPExcel_Style_Fill
PHPExcel_Style_Fill

Code

public function setEndColor(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
      ->getEndColor()
      ->getStyleArray(array(
      'argb' => $color
        ->getARGB(),
    ));
    $this
      ->getActiveSheet()
      ->getStyle($this
      ->getSelectedCells())
      ->applyFromArray($styleArray);
  }
  else {
    $this->_endColor = $color;
  }
  return $this;
}