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: 95 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