Search moodle.org's
Developer Documentation

See Release Notes

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

(no description)

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

Defines 1 class


Class: AbstractStyleRegistry  - X-Ref


__construct(Style $defaultStyle)   X-Ref
No description

registerStyle(Style $style)   X-Ref
Registers the given style as a used style.
Duplicate styles won't be registered more than once.

param: Style $style The style to be registered
return: Style the registered style, updated with an internal ID

getRegisteredStyles()   X-Ref

return: Style[] List of registered styles

getStyleFromStyleId(int $styleId)   X-Ref
No description

serialize(Style $style)   X-Ref
Serializes the style for future comparison with other styles.
The ID is excluded from the comparison, as we only care about
actual style properties.

return: string The serialized style

hasSerializedStyleAlreadyBeenRegistered(string $serializedStyle)   X-Ref
Returns whether the serialized style has already been registered.

param: string $serializedStyle The serialized style

getStyleFromSerializedStyle(string $serializedStyle)   X-Ref
Returns the registered style associated to the given serialization.

param: string $serializedStyle The serialized style from which the actual style should be fetched from