Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

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

(no description)

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

Defines 1 class

Comment:: (26 methods):
  __construct()
  getAuthor()
  setAuthor()
  getText()
  setText()
  getWidth()
  setWidth()
  getHeight()
  setHeight()
  getMarginLeft()
  setMarginLeft()
  getMarginTop()
  setMarginTop()
  getVisible()
  setVisible()
  setFillColor()
  getFillColor()
  setAlignment()
  getAlignment()
  getHashCode()
  __clone()
  __toString()
  hasBackgroundImage()
  getBackgroundImage()
  setBackgroundImage()
  setSizeAsBackgroundImage()


Class: Comment  - X-Ref

__construct()   X-Ref
Create a new Comment.


getAuthor()   X-Ref
Get Author.


setAuthor(string $author)   X-Ref
Set Author.


getText()   X-Ref
Get Rich text comment.


setText(RichText $text)   X-Ref
Set Rich text comment.


getWidth()   X-Ref
Get comment width (CSS style, i.e. XXpx or YYpt).


setWidth(string $width)   X-Ref
Set comment width (CSS style, i.e. XXpx or YYpt). Default unit is pt.


getHeight()   X-Ref
Get comment height (CSS style, i.e. XXpx or YYpt).


setHeight(string $height)   X-Ref
Set comment height (CSS style, i.e. XXpx or YYpt). Default unit is pt.


getMarginLeft()   X-Ref
Get left margin (CSS style, i.e. XXpx or YYpt).


setMarginLeft(string $margin)   X-Ref
Set left margin (CSS style, i.e. XXpx or YYpt). Default unit is pt.


getMarginTop()   X-Ref
Get top margin (CSS style, i.e. XXpx or YYpt).


setMarginTop(string $margin)   X-Ref
Set top margin (CSS style, i.e. XXpx or YYpt). Default unit is pt.


getVisible()   X-Ref
Is the comment visible by default?


setVisible(bool $visibility)   X-Ref
Set comment default visibility.


setFillColor(Color $color)   X-Ref
Set fill color.


getFillColor()   X-Ref
Get fill color.


setAlignment(string $alignment)   X-Ref
Set Alignment.


getAlignment()   X-Ref
Get Alignment.


getHashCode()   X-Ref
Get hash code.


__clone()   X-Ref
Implement PHP __clone to create a deep clone, not just a shallow copy.


__toString()   X-Ref
Convert to string.


hasBackgroundImage()   X-Ref
Check is background image exists.


getBackgroundImage()   X-Ref
Returns background image.


setBackgroundImage(Drawing $objDrawing)   X-Ref
Sets background image.


setSizeAsBackgroundImage()   X-Ref
Sets size of comment as size of background image.