Constants

PROTECTION_INHERIT

PROTECTION_INHERIT = 'inherit'

Protection styles

PROTECTION_PROTECTED

PROTECTION_PROTECTED = 'protected'

PROTECTION_UNPROTECTED

PROTECTION_UNPROTECTED = 'unprotected'

Properties

$_isSupervisor

$_isSupervisor : boolean

Supervisor?

Type

boolean

$_parent

$_parent : \PHPExcel_Style

Parent. Only used for supervisor

Type

\PHPExcel_Style

$_locked

$_locked : string

Locked

Type

string

$_hidden

$_hidden : string

Hidden

Type

string

Methods

__construct()

__construct(boolean  $isSupervisor = FALSE, boolean  $isConditional = FALSE) 

Create a new PHPExcel_Style_Protection

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

bindParent()

bindParent(\PHPExcel  $parent,   $parentPropertyName = NULL) : \PHPExcel_Style_Supervisor

Bind parent. Only used for supervisor

Parameters

\PHPExcel $parent
$parentPropertyName

Returns

\PHPExcel_Style_Supervisor

getIsSupervisor()

getIsSupervisor() : boolean

Is this a supervisor or a cell style component?

Returns

boolean

getActiveSheet()

getActiveSheet() : \PHPExcel_Worksheet

Get the currently active sheet. Only used for supervisor

Returns

\PHPExcel_Worksheet

getSelectedCells()

getSelectedCells() : string

Get the currently active cell coordinate in currently active sheet.

Only used for supervisor

Returns

string —

E.g. 'A1'

getActiveCell()

getActiveCell() : string

Get the currently active cell coordinate in currently active sheet.

Only used for supervisor

Returns

string —

E.g. 'A1'

__clone()

__clone() 

Implement PHP __clone to create a deep clone, not just a shallow copy.

getSharedComponent()

getSharedComponent() : \PHPExcel_Style_Protection

Get the shared style component for the currently active cell in currently active sheet.

Only used for style supervisor

Returns

\PHPExcel_Style_Protection

getStyleArray()

getStyleArray(array  $array) : array

Build style array from subcomponents

Parameters

array $array

Returns

array

applyFromArray()

applyFromArray(array  $pStyles = NULL) : \PHPExcel_Style_Protection

Apply styles from array

$objPHPExcel->getActiveSheet()->getStyle('B2')->getLocked()->applyFromArray( array( 'locked' => TRUE, 'hidden' => FALSE ) );

Parameters

array $pStyles

Array containing style information

Throws

\PHPExcel_Exception

Returns

\PHPExcel_Style_Protection

getLocked()

getLocked() : string

Get locked

Returns

string

setLocked()

setLocked(string  $pValue = self::PROTECTION_INHERIT) : \PHPExcel_Style_Protection

Set locked

Parameters

string $pValue

Returns

\PHPExcel_Style_Protection

getHidden()

getHidden() : string

Get hidden

Returns

string

setHidden()

setHidden(string  $pValue = self::PROTECTION_INHERIT) : \PHPExcel_Style_Protection

Set hidden

Parameters

string $pValue

Returns

\PHPExcel_Style_Protection

getHashCode()

getHashCode() : string

Get hash code

Returns

string —

Hash code