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] [Versions 310 and 402] [Versions 310 and 403]

(no description)

File Size: 331 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: Comment

getText()   X-Ref
Get Rich text comment.

return: RichText

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

param: RichText $pValue
return: Comment

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

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

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

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

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

return: bool

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

param: bool $value
return: Comment

getFillColor()   X-Ref
Get fill color.

return: Style\Color

setAlignment($alignment)   X-Ref
Set Alignment.

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

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