MDL-72619 core_cache: Move renderer to namespace

This commit is contained in:
sam marshall
2021-10-05 09:56:59 +01:00
parent 1a9bee69e6
commit b8291d04f4
4 changed files with 21 additions and 21 deletions
+1 -1
View File
@@ -65,7 +65,7 @@ $title = array_key_exists('title', $forminfo) ? $forminfo['title'] : new lang_st
$PAGE->set_title($title);
$PAGE->set_heading($SITE->fullname);
/* @var core_cache_renderer $renderer */
/** @var \core_cache\output\renderer $renderer */
$renderer = $PAGE->get_renderer('core_cache');
echo $renderer->header();
+2 -2
View File
@@ -400,8 +400,8 @@ abstract class administration_helper extends cache_helper {
/**
* This function must be implemented to display the cache admin page.
*
* @param core_cache_renderer $renderer the renderer used to generate the page.
* @param \core_cache\output\renderer $renderer the renderer used to generate the page.
* @return string the HTML for the page.
*/
public abstract function generate_admin_page(\core_cache_renderer $renderer): string;
abstract public function generate_admin_page(\core_cache\output\renderer $renderer): string;
}
+4 -4
View File
@@ -31,7 +31,7 @@
namespace core_cache\local;
defined('MOODLE_INTERNAL') || die();
use cache_store, cache_factory, cache_config_writer, cache_helper, core_cache_renderer;
use cache_store, cache_factory, cache_config_writer, cache_helper;
/**
* A cache helper for administration tasks
@@ -765,10 +765,10 @@ class administration_display_helper extends \core_cache\administration_helper {
/**
* Outputs the main admin page by generating it through the renderer.
*
* @param core_cache_renderer $renderer the renderer to use to generate the page.
* @param \core_cache\output\renderer $renderer the renderer to use to generate the page.
* @return string the HTML for the admin page.
*/
public function generate_admin_page(core_cache_renderer $renderer): string {
public function generate_admin_page(\core_cache\output\renderer $renderer): string {
$context = \context_system::instance();
$html = '';
@@ -792,4 +792,4 @@ class administration_display_helper extends \core_cache\administration_helper {
return $html;
}
}
}
+14 -14
View File
@@ -14,28 +14,28 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* The Cache renderer.
*
* This file is part of Moodle's cache API, affectionately called MUC.
*
* @package core
* @category cache
* @copyright 2012 Sam Hemelryk
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace core_cache\output;
defined('MOODLE_INTERNAL') || die();
use cache_factory;
use cache_store;
use context;
use core_collator;
use html_table;
use html_table_cell;
use html_table_row;
use html_writer;
use lang_string;
use moodle_url;
use single_select;
/**
* The cache renderer (mainly admin interfaces).
*
* @package core
* @category cache
* @package core_cache
* @copyright 2012 Sam Hemelryk
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class core_cache_renderer extends plugin_renderer_base {
class renderer extends \plugin_renderer_base {
/**
* Displays store summaries.