Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Differences Between: [Versions 310 and 401] [Versions 311 and 401] [Versions 39 and 401] [Versions 401 and 402] [Versions 401 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.

param: bool $sheet
return: $this

getObjects()   X-Ref
Get Objects.

return: bool

setObjects($objects)   X-Ref
Set Objects.

param: bool $objects
return: $this

getScenarios()   X-Ref
Get Scenarios.

return: bool

setScenarios($scenarios)   X-Ref
Set Scenarios.

param: bool $scenarios
return: $this

getFormatCells()   X-Ref
Get FormatCells.

return: bool

setFormatCells($formatCells)   X-Ref
Set FormatCells.

param: bool $formatCells
return: $this

getFormatColumns()   X-Ref
Get FormatColumns.

return: bool

setFormatColumns($formatColumns)   X-Ref
Set FormatColumns.

param: bool $formatColumns
return: $this

getFormatRows()   X-Ref
Get FormatRows.

return: bool

setFormatRows($formatRows)   X-Ref
Set FormatRows.

param: bool $formatRows
return: $this

getInsertColumns()   X-Ref
Get InsertColumns.

return: bool

setInsertColumns($insertColumns)   X-Ref
Set InsertColumns.

param: bool $insertColumns
return: $this

getInsertRows()   X-Ref
Get InsertRows.

return: bool

setInsertRows($insertRows)   X-Ref
Set InsertRows.

param: bool $insertRows
return: $this

getInsertHyperlinks()   X-Ref
Get InsertHyperlinks.

return: bool

setInsertHyperlinks($insertHyperLinks)   X-Ref
Set InsertHyperlinks.

param: bool $insertHyperLinks
return: $this

getDeleteColumns()   X-Ref
Get DeleteColumns.

return: bool

setDeleteColumns($deleteColumns)   X-Ref
Set DeleteColumns.

param: bool $deleteColumns
return: $this

getDeleteRows()   X-Ref
Get DeleteRows.

return: bool

setDeleteRows($deleteRows)   X-Ref
Set DeleteRows.

param: bool $deleteRows
return: $this

getSelectLockedCells()   X-Ref
Get SelectLockedCells.

return: bool

setSelectLockedCells($selectLockedCells)   X-Ref
Set SelectLockedCells.

param: bool $selectLockedCells
return: $this

getSort()   X-Ref
Get Sort.

return: bool

setSort($sort)   X-Ref
Set Sort.

param: bool $sort
return: $this

getAutoFilter()   X-Ref
Get AutoFilter.

return: bool

setAutoFilter($autoFilter)   X-Ref
Set AutoFilter.

param: bool $autoFilter
return: $this

getPivotTables()   X-Ref
Get PivotTables.

return: bool

setPivotTables($pivotTables)   X-Ref
Set PivotTables.

param: bool $pivotTables
return: $this

getSelectUnlockedCells()   X-Ref
Get SelectUnlockedCells.

return: bool

setSelectUnlockedCells($selectUnlockedCells)   X-Ref
Set SelectUnlockedCells.

param: bool $selectUnlockedCells
return: $this

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

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.