MDL-68612 user: Unified filter deprecations - renderer and renderable

This commit is contained in:
Michael Hawkins 2020-05-06 18:39:22 +08:00
parent 2396e3156f
commit 03cb6064ea
3 changed files with 22 additions and 0 deletions

View file

@ -17,6 +17,7 @@
/**
* Class containing the filter options data for rendering the unified filter autocomplete element for the course participants page.
*
* @deprecated since Moodle 3.9 MDL-68612 - Please use \core_user\table\participants_search::class and table filtersets instead.
* @package core_user
* @copyright 2017 Jun Pataleta
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
@ -34,8 +35,10 @@ defined('MOODLE_INTERNAL') || die();
/**
* Class containing the filter options data for rendering the unified filter autocomplete element for the course participants page.
*
* @deprecated since Moodle 3.9 MDL-68612 - Please use \core_user\table\participants_search::class and table filtersets instead.
* @copyright 2017 Jun Pataleta
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*
*/
class unified_filter implements renderable, templatable {
@ -56,6 +59,10 @@ class unified_filter implements renderable, templatable {
* @param string|moodle_url $baseurl The url with params needed to call up this page.
*/
public function __construct($filteroptions, $selectedoptions, $baseurl = null) {
$deprecatedtext = __CLASS__ . ' class is deprecated. Please use \core\table\participants_search::class' .
' with table filtersets instead.';
debugging($deprecatedtext, DEBUG_DEVELOPER);
$this->filteroptions = $filteroptions;
$this->selectedoptions = $selectedoptions;
if (!empty($baseurl)) {