Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 3.9.x will end* 10 May 2021 (12 months).
  • Bug fixes for security issues in 3.9.x will end* 8 May 2023 (36 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 39 and 311] [Versions 39 and 400] [Versions 39 and 401]

(no description)

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

Defines 1 class


Class: StyleManager  - X-Ref

Class StyleManager
Manages styles to be applied to a cell

shouldApplyStyleOnEmptyCell($styleId)   X-Ref
For empty cells, we can specify a style or not. If no style are specified,
then the software default will be applied. But sometimes, it may be useful
to override this default style, for instance if the cell should have a
background color different than the default one or some borders
(fonts property don't really matter here).

param: int $styleId
return: bool Whether the cell should define a custom style

getStylesXMLFileContent()   X-Ref
Returns the content of the "styles.xml" file, given a list of styles.

return: string

getFontsSectionContent()   X-Ref
Returns the content of the "<fonts>" section.

return: string

getFillsSectionContent()   X-Ref
Returns the content of the "<fills>" section.

return: string

getBordersSectionContent()   X-Ref
Returns the content of the "<borders>" section.

return: string

getCellStyleXfsSectionContent()   X-Ref
Returns the content of the "<cellStyleXfs>" section.

return: string

getCellXfsSectionContent()   X-Ref
Returns the content of the "<cellXfs>" section.

return: string

getFillIdForStyleId($styleId)   X-Ref
Returns the fill ID associated to the given style ID.
For the default style, we don't a fill.

param: int $styleId
return: int

getBorderIdForStyleId($styleId)   X-Ref
Returns the fill ID associated to the given style ID.
For the default style, we don't a border.

param: int $styleId
return: int

getCellStylesSectionContent()   X-Ref
Returns the content of the "<cellStyles>" section.

return: string