Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.x is supported too.
   1  <?php
   2  
   3  declare(strict_types=1);
   4  
   5  namespace OpenSpout\Common\Entity\Comment;
   6  
   7  /**
   8   * This class defines a comment that can be added to a cell.
   9   */
  10  final class Comment
  11  {
  12      /** Comment height (CSS style, i.e. XXpx or YYpt). */
  13      public string $height = '55.5pt';
  14  
  15      /** Comment width (CSS style, i.e. XXpx or YYpt). */
  16      public string $width = '96pt';
  17  
  18      /** Left margin (CSS style, i.e. XXpx or YYpt). */
  19      public string $marginLeft = '59.25pt';
  20  
  21      /** Top margin (CSS style, i.e. XXpx or YYpt). */
  22      public string $marginTop = '1.5pt';
  23  
  24      /** Visible. */
  25      public bool $visible = false;
  26  
  27      /** Comment fill color. */
  28      public string $fillColor = '#FFFFE1';
  29  
  30      /** @var TextRun[] */
  31      private array $textRuns = [];
  32  
  33      public function addTextRun(?TextRun $textRun): void
  34      {
  35          $this->textRuns[] = $textRun;
  36      }
  37  
  38      /**
  39       * The TextRuns for this comment.
  40       *
  41       * @return TextRun[]
  42       */
  43      public function getTextRuns(): array
  44      {
  45          return $this->textRuns;
  46      }
  47  }