Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.x is supported too.

(no description)

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

Defines 1 class


Class: StyleManager  - X-Ref


__construct(StyleRegistry $styleRegistry)   X-Ref
No description

shouldApplyStyleOnEmptyCell(?int $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).

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.


getFormatsSectionContent()   X-Ref
Returns the content of the "<numFmts>" section.


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


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


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


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


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


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


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


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


getFormatIdForStyleId(int $styleId)   X-Ref
Returns the format ID associated to the given style ID.
For the default style use general format.