You are here

public function PHPExcel_Style::__construct in Loft Data Grids 7.2

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

Create a new PHPExcel_Style

Parameters

boolean $isSupervisor Flag indicating if this is a supervisor or not: Leave this value at default unless you understand exactly what its ramifications are

boolean $isConditional Flag indicating if this is a conditional style or not: Leave this value at default unless you understand exactly what its ramifications are

Overrides PHPExcel_Style_Supervisor::__construct

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/Style.php, line 111

Class

PHPExcel_Style
PHPExcel_Style

Code

public function __construct($isSupervisor = false, $isConditional = false) {

  // Supervisor?
  $this->_isSupervisor = $isSupervisor;

  // Initialise values
  $this->_conditionalStyles = array();
  $this->_font = new PHPExcel_Style_Font($isSupervisor, $isConditional);
  $this->_fill = new PHPExcel_Style_Fill($isSupervisor, $isConditional);
  $this->_borders = new PHPExcel_Style_Borders($isSupervisor, $isConditional);
  $this->_alignment = new PHPExcel_Style_Alignment($isSupervisor, $isConditional);
  $this->_numberFormat = new PHPExcel_Style_NumberFormat($isSupervisor, $isConditional);
  $this->_protection = new PHPExcel_Style_Protection($isSupervisor, $isConditional);

  // bind parent if we are a supervisor
  if ($isSupervisor) {
    $this->_font
      ->bindParent($this);
    $this->_fill
      ->bindParent($this);
    $this->_borders
      ->bindParent($this);
    $this->_alignment
      ->bindParent($this);
    $this->_numberFormat
      ->bindParent($this);
    $this->_protection
      ->bindParent($this);
  }
}