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: 101 lines (4 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

StyleMerger:: (4 methods):
  merge()
  mergeFontStyles()
  mergeOtherFontProperties()
  mergeCellProperties()


Class: StyleMerger  - X-Ref

Class StyleMerger
Takes care of merging styles together

merge(Style $style, Style $baseStyle)   X-Ref
Merges the current style with the given style, using the given style as a base. This means that:
- if current style and base style both have property A set, use current style property's value
- if current style has property A set but base style does not, use current style property's value
- if base style has property A set but current style does not, use base style property's value

return: Style New style corresponding to the merge of the 2 styles
param: Style $style
param: Style $baseStyle

mergeFontStyles(Style $styleToUpdate, Style $style, Style $baseStyle)   X-Ref

return: void
param: Style $styleToUpdate (passed as reference)
param: Style $style
param: Style $baseStyle

mergeOtherFontProperties(Style $styleToUpdate, Style $style, Style $baseStyle)   X-Ref

return: void
param: Style $styleToUpdate Style to update (passed as reference)
param: Style $style
param: Style $baseStyle

mergeCellProperties(Style $styleToUpdate, Style $style, Style $baseStyle)   X-Ref

return: void
param: Style $styleToUpdate Style to update (passed as reference)
param: Style $style
param: Style $baseStyle