Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

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

(no description)

File Size: 386 lines (8 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

param: int $id
return: Style

getBorder()   X-Ref

return: Border

setBorder(Border $border)   X-Ref

param: Border $border
return: Style

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

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

hasSetFontSize()   X-Ref

return: bool

getFontColor()   X-Ref

return: string

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

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

hasSetFontColor()   X-Ref

return: bool

getFontName()   X-Ref

return: string

setFontName($fontName)   X-Ref

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

hasSetFontName()   X-Ref

return: bool

shouldWrapText()   X-Ref

return: bool

setShouldWrapText($shouldWrap = true)   X-Ref

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

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

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

getBackgroundColor()   X-Ref

return: string

shouldApplyBackgroundColor()   X-Ref

return: bool Whether the background color should be applied