PHPExcel classes » \PHPExcel_Style_Protection

PHPExcel_Style_Protection

category | PHPExcel
package | PHPExcel_Style
copyright | Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)

### Methods

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

    __clone()

Inherited

inherited_from | \PHPExcel_Style_Supervisor::__clone()

## Create a new PHPExcel_Style_Protection

    __construct(boolean $isSupervisor, boolean $isConditional)

### Parameters

#### $isSupervisor

`boolean`

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

#### $isConditional

`boolean`

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

## Apply styles from array

    applyFromArray(array $pStyles) : \PHPExcel_Style_Protection

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

### Parameters

#### $pStyles

`array`

Array containing style information

### Exceptions

`\PHPExcel_Exception` |

### Returns

`\PHPExcel_Style_Protection`

## Bind parent.

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

Inherited

Only used for supervisor

inherited_from | \PHPExcel_Style_Supervisor::bindParent()

### Parameters

#### $parent

`\PHPExcel`

#### $parentPropertyName

### Returns

`\PHPExcel_Style_Supervisor`

## Get the currently active cell coordinate in currently active sheet.

    getActiveCell() : string

Inherited

Only used for supervisor

inherited_from | \PHPExcel_Style_Supervisor::getActiveCell()

### Returns

`string`E.g. 'A1'

## Get the currently active sheet.

    getActiveSheet() : \PHPExcel_Worksheet

Inherited

Only used for supervisor

inherited_from | \PHPExcel_Style_Supervisor::getActiveSheet()

### Returns

`\PHPExcel_Worksheet`

## Get hash code

    getHashCode() : string

### Returns

`string`Hash code

## Get hidden

    getHidden() : string

### Returns

`string`

## Is this a supervisor or a cell style component?

    getIsSupervisor() : boolean

Inherited

inherited_from | \PHPExcel_Style_Supervisor::getIsSupervisor()

### Returns

`boolean`

## Get locked

    getLocked() : string

### Returns

`string`

## Get the currently active cell coordinate in currently active sheet.

    getSelectedCells() : string

Inherited

Only used for supervisor

inherited_from | \PHPExcel_Style_Supervisor::getSelectedCells()

### Returns

`string`E.g. 'A1'

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

    getSharedComponent() : \PHPExcel_Style_Protection

Only used for style supervisor

### Returns

`\PHPExcel_Style_Protection`

## Build style array from subcomponents

    getStyleArray(array $array) : array

### Parameters

#### $array

`array`

### Returns

`array`

## Set hidden

    setHidden(string $pValue) : \PHPExcel_Style_Protection

### Parameters

#### $pValue

`string`

### Returns

`\PHPExcel_Style_Protection`

## Set locked

    setLocked(string $pValue) : \PHPExcel_Style_Protection

### Parameters

#### $pValue

`string`

### Returns

`\PHPExcel_Style_Protection`

### Properties

##

    $_hidden : string

##

    $_isSupervisor : boolean

Inherited

inherited_from | \PHPExcel_Style_Supervisor::$$_isSupervisor

##

    $_locked : string

##

    $_parent : \PHPExcel_Style

Inherited

Only used for supervisor

inherited_from | \PHPExcel_Style_Supervisor::$$_parent

### Constants

## Protection styles

    PROTECTION_INHERIT

## PROTECTION_PROTECTED

    PROTECTION_PROTECTED

## PROTECTION_UNPROTECTED

    PROTECTION_UNPROTECTED