67 public function __construct($isSupervisor = FALSE, $isConditional = FALSE)
70 parent::__construct($isSupervisor);
73 if (!$isConditional) {
87 return $this->_parent->getSharedComponent()->getProtection();
98 return array(
'protection' => $array);
118 if (is_array($pStyles)) {
119 if ($this->_isSupervisor) {
122 if (isset($pStyles[
'locked'])) {
125 if (isset($pStyles[
'hidden'])) {
141 if ($this->_isSupervisor) {
153 public function setLocked($pValue = self::PROTECTION_INHERIT) {
154 if ($this->_isSupervisor) {
155 $styleArray = $this->
getStyleArray(array(
'locked' => $pValue));
158 $this->_locked = $pValue;
169 if ($this->_isSupervisor) {
181 public function setHidden($pValue = self::PROTECTION_INHERIT) {
182 if ($this->_isSupervisor) {
183 $styleArray = $this->
getStyleArray(array(
'hidden' => $pValue));
186 $this->_hidden = $pValue;
197 if ($this->_isSupervisor) {
An exception for terminatinating execution or to throw for unit testing.
getStyleArray($array)
Build style array from subcomponents.
setHidden($pValue=self::PROTECTION_INHERIT)
Set hidden.
getSharedComponent()
Get the shared style component for the currently active cell in currently active sheet.
getHashCode()
Get hash code.
__construct($isSupervisor=FALSE, $isConditional=FALSE)
Create a new PHPExcel_Style_Protection.
applyFromArray($pStyles=NULL)
Apply styles from array.
const PROTECTION_UNPROTECTED
const PROTECTION_INHERIT
Protection styles.
setLocked($pValue=self::PROTECTION_INHERIT)
Set locked.
const PROTECTION_PROTECTED
getActiveSheet()
Get the currently active sheet.
getSelectedCells()
Get the currently active cell coordinate in currently active sheet.