Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Differences Between: [Versions 310 and 311] [Versions 39 and 311]

(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

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

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

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

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

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

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

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