From 81d2800a551e6227cacaefd18b804c4a456c4980 Mon Sep 17 00:00:00 2001 From: Paul Holden Date: Thu, 7 Mar 2024 17:47:35 +0000 Subject: [PATCH] MDL-73165 output: final removal of deprecated display logo method. --- lib/outputrenderers.php | 19 +++---------------- lib/upgrade.txt | 5 +++++ 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/lib/outputrenderers.php b/lib/outputrenderers.php index eadf44544d3..d4edea53231 100644 --- a/lib/outputrenderers.php +++ b/lib/outputrenderers.php @@ -421,25 +421,12 @@ class renderer_base { } /** - * Whether we should display the main logo. * @deprecated since Moodle 4.0 - * @todo final deprecation. To be removed in Moodle 4.4 MDL-73165. - * @param int $headinglevel The heading level we want to check against. - * @return bool */ - public function should_display_main_logo($headinglevel = 1) { - debugging('should_display_main_logo() is deprecated and will be removed in Moodle 4.4.', DEBUG_DEVELOPER); - // Only render the logo if we're on the front page or login page and the we have a logo. - $logo = $this->get_logo_url(); - if ($headinglevel == 1 && !empty($logo)) { - if ($this->page->pagelayout == 'frontpage' || $this->page->pagelayout == 'login') { - return true; - } - } - - return false; + #[\core\attribute\deprecated(null, reason: 'It is no longer used', since: '4.0', final: true)] + public function should_display_main_logo() { + \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); } - } diff --git a/lib/upgrade.txt b/lib/upgrade.txt index 49ec5e12f8e..a89a0ac41b1 100644 --- a/lib/upgrade.txt +++ b/lib/upgrade.txt @@ -1,6 +1,11 @@ This files describes API changes in core libraries and APIs, information provided here is intended especially for developers. +=== 4.5 === + + * The following previously deprecated methods have been removed and can no longer be used: + - `renderer_base::should_display_main_logo` + === 4.4 === * New modinfo methods related to delegated sections (sections controlled by a component):