You are here

public function PHPExcel_Style_Protection::setLocked in Loft Data Grids 7.2

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

Set locked

Parameters

string $pValue:

Return value

PHPExcel_Style_Protection

1 call to PHPExcel_Style_Protection::setLocked()
PHPExcel_Style_Protection::applyFromArray in vendor/phpoffice/phpexcel/Classes/PHPExcel/Style/Protection.php
Apply styles from array

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/Style/Protection.php, line 153

Class

PHPExcel_Style_Protection
PHPExcel_Style_Protection

Code

public function setLocked($pValue = self::PROTECTION_INHERIT) {
  if ($this->_isSupervisor) {
    $styleArray = $this
      ->getStyleArray(array(
      'locked' => $pValue,
    ));
    $this
      ->getActiveSheet()
      ->getStyle($this
      ->getSelectedCells())
      ->applyFromArray($styleArray);
  }
  else {
    $this->_locked = $pValue;
  }
  return $this;
}