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 311 and 400] [Versions 311 and 401] [Versions 311 and 402] [Versions 311 and 403] [Versions 39 and 311]

(no description)

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

Defines 1 class

Comment:: (21 methods):
  __construct()
  getAuthor()
  setAuthor()
  getText()
  setText()
  getWidth()
  setWidth()
  getHeight()
  setHeight()
  getMarginLeft()
  setMarginLeft()
  getMarginTop()
  setMarginTop()
  getVisible()
  setVisible()
  getFillColor()
  setAlignment()
  getAlignment()
  getHashCode()
  __clone()
  __toString()


Class: Comment  - X-Ref

__construct()   X-Ref
Create a new Comment.


getAuthor()   X-Ref
Get Author.

return: string

setAuthor($author)   X-Ref
Set Author.

param: string $author
return: $this

getText()   X-Ref
Get Rich text comment.

return: RichText

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

return: $this

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

return: string

setWidth($width)   X-Ref
Set comment width (CSS style, i.e. XXpx or YYpt).

param: string $width
return: $this

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

return: string

setHeight($value)   X-Ref
Set comment height (CSS style, i.e. XXpx or YYpt).

param: string $value
return: $this

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

return: string

setMarginLeft($value)   X-Ref
Set left margin (CSS style, i.e. XXpx or YYpt).

param: string $value
return: $this

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

return: string

setMarginTop($value)   X-Ref
Set top margin (CSS style, i.e. XXpx or YYpt).

param: string $value
return: $this

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

return: bool

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

param: bool $value
return: $this

getFillColor()   X-Ref
Get fill color.

return: Style\Color

setAlignment($alignment)   X-Ref
Set Alignment.

param: string $alignment see Style\Alignment::HORIZONTAL_*
return: $this

getAlignment()   X-Ref
Get Alignment.

return: string

getHashCode()   X-Ref
Get hash code.

return: string Hash code

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


__toString()   X-Ref
Convert to string.

return: string