From 09940e459a2cb5d75b5fd54548b11e268be4f515 Mon Sep 17 00:00:00 2001
From: Justus Dieckmann <justusdieckmann@wwu.de>
Date: Tue, 19 May 2020 19:53:29 +0200
Subject: [PATCH] Use $this->output/page instead of globals in renderer

---
 renderer.php | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/renderer.php b/renderer.php
index 745f433..b3dda1a 100644
--- a/renderer.php
+++ b/renderer.php
@@ -36,8 +36,7 @@ class tool_lifecycle_renderer extends plugin_renderer_base {
      * Write the page footer
      */
     public function footer() {
-        global $OUTPUT;
-        echo $OUTPUT->footer();
+        echo $this->output->footer();
     }
 
     /**
@@ -46,12 +45,11 @@ class tool_lifecycle_renderer extends plugin_renderer_base {
      * @param string $title optional page title.
      */
     public function header($title = null) {
-        global $OUTPUT, $PAGE;
-        echo $OUTPUT->header();
+        echo $this->output->header();
         if ($title) {
-            echo $OUTPUT->heading($title);
+            echo $this->output->heading($title);
         } else {
-            echo $OUTPUT->heading($PAGE->heading);
+            echo $this->output->heading($this->page->heading);
         }
     }
 
-- 
GitLab