MDL-74939 output: final removal of deprecated navigation namespace.
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
issueNumber: MDL-74939
|
||||
notes:
|
||||
core:
|
||||
- message: >-
|
||||
Support for deprecated `<component>\local\views\secondary`
|
||||
block/activity namespace, for overriding secondary navigation, is now
|
||||
entirely removed
|
||||
type: removed
|
||||
+3
-8
@@ -1726,22 +1726,17 @@ class block_manager {
|
||||
* Convenience function to check whether a block is implementing a secondary nav class and return it
|
||||
* initialised to the calling function
|
||||
*
|
||||
* @todo MDL-74939 Remove support for old 'local\views\secondary' class location
|
||||
* @param block_base $block
|
||||
* @return \core\navigation\views\secondary
|
||||
*/
|
||||
protected function get_secondarynav(block_base $block): \core\navigation\views\secondary {
|
||||
$class = "core_block\\navigation\\views\\secondary";
|
||||
|
||||
// Check whether block defines its own secondary navigation.
|
||||
if (class_exists("block_{$block->name()}\\navigation\\views\\secondary")) {
|
||||
$class = "block_{$block->name()}\\navigation\\views\\secondary";
|
||||
} else if (class_exists("block_{$block->name()}\\local\\views\\secondary")) {
|
||||
// For backwards compatibility, support the old location for this class (it was in a
|
||||
// 'local' namespace which shouldn't be used for core APIs).
|
||||
debugging("The class block_{$block->name()}\\local\\views\\secondary uses a deprecated " .
|
||||
"namespace. Please move it to block_{$block->name()}\\navigation\\views\\secondary.",
|
||||
DEBUG_DEVELOPER);
|
||||
$class = "block_{$block->name()}\\local\\views\\secondary";
|
||||
}
|
||||
|
||||
$secondarynav = new $class($this->page);
|
||||
$secondarynav->initialise();
|
||||
return $secondarynav;
|
||||
|
||||
@@ -42,7 +42,6 @@ $renamedclasses = [
|
||||
'core_course\\local\\entities\\course_category' => 'core_course\\reportbuilder\\local\\entities\\course_category',
|
||||
'core_cohort\\local\\entities\\cohort' => 'core_cohort\\reportbuilder\\local\\entities\\cohort',
|
||||
'core_cohort\\local\\entities\\cohort_member' => 'core_cohort\\reportbuilder\\local\\entities\\cohort_member',
|
||||
'core_block\\local\\views\\secondary' => 'core_block\\navigation\\views\\secondary',
|
||||
// Since Moodle 4.2.
|
||||
'Box\\Spout' => 'OpenSpout',
|
||||
// Since Moodle 4.3.
|
||||
|
||||
+2
-9
@@ -879,22 +879,15 @@ class moodle_page {
|
||||
/**
|
||||
* Returns the secondary navigation object
|
||||
*
|
||||
* @todo MDL-74939 Remove support for old 'local\views\secondary' class location
|
||||
* @return secondary
|
||||
*/
|
||||
protected function magic_get_secondarynav() {
|
||||
if ($this->_secondarynav === null) {
|
||||
$class = 'core\navigation\views\secondary';
|
||||
// Try and load a custom class first.
|
||||
|
||||
// Check whether activity defines its own secondary navigation.
|
||||
if (class_exists("mod_{$this->activityname}\\navigation\\views\\secondary")) {
|
||||
$class = "mod_{$this->activityname}\\navigation\\views\\secondary";
|
||||
} else if (class_exists("mod_{$this->activityname}\\local\\views\\secondary")) {
|
||||
// For backwards compatibility, support the old location for this class (it was in a
|
||||
// 'local' namespace which shouldn't be used for core APIs).
|
||||
debugging("The class mod_{$this->activityname}}\\local\\views\\secondary uses a deprecated " .
|
||||
"namespace. Please move it to mod_{$this->activityname}\\navigation\\views\\secondary.",
|
||||
DEBUG_DEVELOPER);
|
||||
$class = "mod_{$this->activityname}\\local\\views\\secondary";
|
||||
}
|
||||
|
||||
$this->_secondarynav = new $class($this);
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
<?php
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* This file contains mappings for classes that have been renamed.
|
||||
*
|
||||
* @package mod_assign
|
||||
* @copyright 2021 Catalyst IT Australia Pty Ltd
|
||||
* @author Cameron Ball <[email protected]>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$renamedclasses = [
|
||||
// Since Moodle 4.1.
|
||||
'mod_assign\local\views\secondary' => 'mod_assign\navigation\views\secondary',
|
||||
];
|
||||
@@ -25,8 +25,6 @@
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$renamedclasses = [
|
||||
// Since Moodle 4.1.
|
||||
'mod_quiz\local\views\secondary' => 'mod_quiz\navigation\views\secondary',
|
||||
// Since Moodle 4.2.
|
||||
'mod_quiz_display_options' => 'mod_quiz\question\display_options',
|
||||
'qubaids_for_quiz' => 'mod_quiz\question\qubaids_for_quiz',
|
||||
|
||||
Reference in New Issue
Block a user