Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

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

(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($pValue)   X-Ref
Set Sheet.

param: bool $pValue
return: $this

getObjects()   X-Ref
Get Objects.

return: bool

setObjects($pValue)   X-Ref
Set Objects.

param: bool $pValue
return: $this

getScenarios()   X-Ref
Get Scenarios.

return: bool

setScenarios($pValue)   X-Ref
Set Scenarios.

param: bool $pValue
return: $this

getFormatCells()   X-Ref
Get FormatCells.

return: bool

setFormatCells($pValue)   X-Ref
Set FormatCells.

param: bool $pValue
return: $this

getFormatColumns()   X-Ref
Get FormatColumns.

return: bool

setFormatColumns($pValue)   X-Ref
Set FormatColumns.

param: bool $pValue
return: $this

getFormatRows()   X-Ref
Get FormatRows.

return: bool

setFormatRows($pValue)   X-Ref
Set FormatRows.

param: bool $pValue
return: $this

getInsertColumns()   X-Ref
Get InsertColumns.

return: bool

setInsertColumns($pValue)   X-Ref
Set InsertColumns.

param: bool $pValue
return: $this

getInsertRows()   X-Ref
Get InsertRows.

return: bool

setInsertRows($pValue)   X-Ref
Set InsertRows.

param: bool $pValue
return: $this

getInsertHyperlinks()   X-Ref
Get InsertHyperlinks.

return: bool

setInsertHyperlinks($pValue)   X-Ref
Set InsertHyperlinks.

param: bool $pValue
return: $this

getDeleteColumns()   X-Ref
Get DeleteColumns.

return: bool

setDeleteColumns($pValue)   X-Ref
Set DeleteColumns.

param: bool $pValue
return: $this

getDeleteRows()   X-Ref
Get DeleteRows.

return: bool

setDeleteRows($pValue)   X-Ref
Set DeleteRows.

param: bool $pValue
return: $this

getSelectLockedCells()   X-Ref
Get SelectLockedCells.

return: bool

setSelectLockedCells($pValue)   X-Ref
Set SelectLockedCells.

param: bool $pValue
return: $this

getSort()   X-Ref
Get Sort.

return: bool

setSort($pValue)   X-Ref
Set Sort.

param: bool $pValue
return: $this

getAutoFilter()   X-Ref
Get AutoFilter.

return: bool

setAutoFilter($pValue)   X-Ref
Set AutoFilter.

param: bool $pValue
return: $this

getPivotTables()   X-Ref
Get PivotTables.

return: bool

setPivotTables($pValue)   X-Ref
Set PivotTables.

param: bool $pValue
return: $this

getSelectUnlockedCells()   X-Ref
Get SelectUnlockedCells.

return: bool

setSelectUnlockedCells($pValue)   X-Ref
Set SelectUnlockedCells.

param: bool $pValue
return: $this

getPassword()   X-Ref
Get hashed password.

return: string

setPassword($pValue, $pAlreadyHashed = false)   X-Ref
Set Password.

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

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.