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 39 and 400]

(no description)

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

Defines 1 class


Class: Style  - X-Ref

Class Style
Represents a style to be applied to a cell

getId()   X-Ref

return: int|null

setId($id)   X-Ref

return: Style
param: int $id

getBorder()   X-Ref

return: Border

setBorder(Border $border)   X-Ref

return: Style
param: Border $border

shouldApplyBorder()   X-Ref

return: bool

isFontBold()   X-Ref

return: bool

setFontBold()   X-Ref

return: Style

hasSetFontBold()   X-Ref

return: bool

isFontItalic()   X-Ref

return: bool

setFontItalic()   X-Ref

return: Style

hasSetFontItalic()   X-Ref

return: bool

isFontUnderline()   X-Ref

return: bool

setFontUnderline()   X-Ref

return: Style

hasSetFontUnderline()   X-Ref

return: bool

isFontStrikethrough()   X-Ref

return: bool

setFontStrikethrough()   X-Ref

return: Style

hasSetFontStrikethrough()   X-Ref

return: bool

getFontSize()   X-Ref

return: int

setFontSize($fontSize)   X-Ref

return: Style
param: int $fontSize Font size, in pixels

hasSetFontSize()   X-Ref

return: bool

getFontColor()   X-Ref

return: string

setFontColor($fontColor)   X-Ref
Sets the font color.

return: Style
param: string $fontColor ARGB color (@see Color)

hasSetFontColor()   X-Ref

return: bool

getFontName()   X-Ref

return: string

setFontName($fontName)   X-Ref

return: Style
param: string $fontName Name of the font to use

hasSetFontName()   X-Ref

return: bool

getCellAlignment()   X-Ref

return: string

setCellAlignment($cellAlignment)   X-Ref

return: Style
param: string $cellAlignment The cell alignment

hasSetCellAlignment()   X-Ref

return: bool

shouldApplyCellAlignment()   X-Ref

return: bool Whether specific cell alignment should be applied

shouldWrapText()   X-Ref

return: bool

setShouldWrapText($shouldWrap = true)   X-Ref

return: Style
param: bool $shouldWrap Should the text be wrapped

hasSetWrapText()   X-Ref

return: bool

shouldApplyFont()   X-Ref

return: bool Whether specific font properties should be applied

setBackgroundColor($color)   X-Ref
Sets the background color

return: Style
param: string $color ARGB color (@see Color)

getBackgroundColor()   X-Ref

return: string

shouldApplyBackgroundColor()   X-Ref

return: bool Whether the background color should be applied

setFormat($format)   X-Ref
Sets format

return: Style
param: string $format

getFormat()   X-Ref

return: string

shouldApplyFormat()   X-Ref

return: bool Whether format should be applied

isRegistered()   X-Ref

return: bool

markAsRegistered(?int $id)   X-Ref
No description

unmarkAsRegistered()   X-Ref
No description

isEmpty()   X-Ref
No description