Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.x is supported too.

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

(no description)

File Size: 517 lines (11 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?


getSheet()   X-Ref
No description

setSheet(?bool $sheet)   X-Ref
No description

getObjects()   X-Ref
No description

setObjects(?bool $objects)   X-Ref
No description

getScenarios()   X-Ref
No description

setScenarios(?bool $scenarios)   X-Ref
No description

getFormatCells()   X-Ref
No description

setFormatCells(?bool $formatCells)   X-Ref
No description

getFormatColumns()   X-Ref
No description

setFormatColumns(?bool $formatColumns)   X-Ref
No description

getFormatRows()   X-Ref
No description

setFormatRows(?bool $formatRows)   X-Ref
No description

getInsertColumns()   X-Ref
No description

setInsertColumns(?bool $insertColumns)   X-Ref
No description

getInsertRows()   X-Ref
No description

setInsertRows(?bool $insertRows)   X-Ref
No description

getInsertHyperlinks()   X-Ref
No description

setInsertHyperlinks(?bool $insertHyperLinks)   X-Ref
No description

getDeleteColumns()   X-Ref
No description

setDeleteColumns(?bool $deleteColumns)   X-Ref
No description

getDeleteRows()   X-Ref
No description

setDeleteRows(?bool $deleteRows)   X-Ref
No description

getSelectLockedCells()   X-Ref
No description

setSelectLockedCells(?bool $selectLockedCells)   X-Ref
No description

getSort()   X-Ref
No description

setSort(?bool $sort)   X-Ref
No description

getAutoFilter()   X-Ref
No description

setAutoFilter(?bool $autoFilter)   X-Ref
No description

getPivotTables()   X-Ref
No description

setPivotTables(?bool $pivotTables)   X-Ref
No description

getSelectUnlockedCells()   X-Ref
No description

setSelectUnlockedCells(?bool $selectUnlockedCells)   X-Ref
No description

getPassword()   X-Ref
Get hashed password.

return: string

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

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

setHashValue(string $password)   X-Ref
No description

generateSalt()   X-Ref
Create a pseudorandom string.


getAlgorithm()   X-Ref
Get algorithm name.


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


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


getSalt()   X-Ref
No description

setSalt(string $salt)   X-Ref
No description

setSaltValue(string $salt)   X-Ref
No description

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.