Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

Differences Between: [Versions 310 and 400] [Versions 311 and 400] [Versions 39 and 400] [Versions 400 and 402] [Versions 400 and 403]

(no description)

File Size: 691 lines (12 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: Protection  - X-Ref

__construct()   X-Ref
Create a new Protection.


isProtectionEnabled()   X-Ref
Is some sort of protection enabled?

return: bool

getSheet()   X-Ref
Get Sheet.

return: bool

setSheet($sheet)   X-Ref
Set Sheet.

return: $this
param: bool $sheet

getObjects()   X-Ref
Get Objects.

return: bool

setObjects($objects)   X-Ref
Set Objects.

return: $this
param: bool $objects

getScenarios()   X-Ref
Get Scenarios.

return: bool

setScenarios($scenarios)   X-Ref
Set Scenarios.

return: $this
param: bool $scenarios

getFormatCells()   X-Ref
Get FormatCells.

return: bool

setFormatCells($formatCells)   X-Ref
Set FormatCells.

return: $this
param: bool $formatCells

getFormatColumns()   X-Ref
Get FormatColumns.

return: bool

setFormatColumns($formatColumns)   X-Ref
Set FormatColumns.

return: $this
param: bool $formatColumns

getFormatRows()   X-Ref
Get FormatRows.

return: bool

setFormatRows($formatRows)   X-Ref
Set FormatRows.

return: $this
param: bool $formatRows

getInsertColumns()   X-Ref
Get InsertColumns.

return: bool

setInsertColumns($insertColumns)   X-Ref
Set InsertColumns.

return: $this
param: bool $insertColumns

getInsertRows()   X-Ref
Get InsertRows.

return: bool

setInsertRows($insertRows)   X-Ref
Set InsertRows.

return: $this
param: bool $insertRows

getInsertHyperlinks()   X-Ref
Get InsertHyperlinks.

return: bool

setInsertHyperlinks($insertHyperLinks)   X-Ref
Set InsertHyperlinks.

return: $this
param: bool $insertHyperLinks

getDeleteColumns()   X-Ref
Get DeleteColumns.

return: bool

setDeleteColumns($deleteColumns)   X-Ref
Set DeleteColumns.

return: $this
param: bool $deleteColumns

getDeleteRows()   X-Ref
Get DeleteRows.

return: bool

setDeleteRows($deleteRows)   X-Ref
Set DeleteRows.

return: $this
param: bool $deleteRows

getSelectLockedCells()   X-Ref
Get SelectLockedCells.

return: bool

setSelectLockedCells($selectLockedCells)   X-Ref
Set SelectLockedCells.

return: $this
param: bool $selectLockedCells

getSort()   X-Ref
Get Sort.

return: bool

setSort($sort)   X-Ref
Set Sort.

return: $this
param: bool $sort

getAutoFilter()   X-Ref
Get AutoFilter.

return: bool

setAutoFilter($autoFilter)   X-Ref
Set AutoFilter.

return: $this
param: bool $autoFilter

getPivotTables()   X-Ref
Get PivotTables.

return: bool

setPivotTables($pivotTables)   X-Ref
Set PivotTables.

return: $this
param: bool $pivotTables

getSelectUnlockedCells()   X-Ref
Get SelectUnlockedCells.

return: bool

setSelectUnlockedCells($selectUnlockedCells)   X-Ref
Set SelectUnlockedCells.

return: $this
param: bool $selectUnlockedCells

getPassword()   X-Ref
Get hashed password.

return: string

setPassword($password, $alreadyHashed = false)   X-Ref
Set Password.

return: $this
param: string $password
param: bool $alreadyHashed If the password has already been hashed, set this to true

generateSalt()   X-Ref
Create a pseudorandom string.


getAlgorithm()   X-Ref
Get algorithm name.


setAlgorithm(string $algorithm)   X-Ref
Set algorithm name.


getSalt()   X-Ref
Get salt value.


setSalt(string $salt)   X-Ref
Set salt value.


getSpinCount()   X-Ref
Get spin count.


setSpinCount(int $spinCount)   X-Ref
Set spin count.


verify(string $password)   X-Ref
Verify that the given non-hashed password can "unlock" the protection.


__clone()   X-Ref
Implement PHP __clone to create a deep clone, not just a shallow copy.