Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-52130

Allow overriding comment template from child class.

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Won't Do
    • Icon: Minor Minor
    • None
    • 2.9.3
    • Comments
    • None
    • MOODLE_29_STABLE

      The comment class (comment/lib.php) has a property 'template' which stores the comment display template. Currently the only way to modify the template from a plugin is by a plugin callback. However in some relevant cases the plugin callback may be too cumbersome for the desired effect. It may be much easier to manage the plugin comments by extending the comment class. But the visibility of the template property is private and as such it cannot be modified from a child class.

      The proposal here is a minimal change of the visibility of the template property from private to protected.

      From

          private $template;
      

      to

          protected $template;
      

        1. 28.png
          28.png
          45 kB
        2. 30.png
          30.png
          54 kB

            itamart Itamar Tzadok (Inactive)
            itamart Itamar Tzadok (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.