Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
moodle
moodle
Commits
2ac93db3
Commit
2ac93db3
authored
May 11, 2022
by
Cameron Ball
Browse files
MDL-74548 backup: Deprecate get/set copy from base controller
parent
07e5f432
Changes
2
Hide whitespace changes
Inline
Side-by-side
backup/controller/base_controller.class.php
View file @
2ac93db3
...
...
@@ -111,8 +111,13 @@ abstract class base_controller extends backup implements loggable {
*
* @param \stdClass $data The course copy data.
* @throws backup_controller_exception
* @deprecated since Moodle 4.1 MDL-74548 - please do not use this method anymore.
* @todo MDL-75025 This method will be deleted in Moodle 4.5
* @see restore_controller::__construct()
*/
public
function
set_copy
(
\
stdClass
$data
)
:
void
{
debugging
(
'The method base_controller::set_copy() is deprecated.
Please use the restore_controller class instead.'
,
DEBUG_DEVELOPER
);
// Only allow setting of copy data when controller is in copy mode.
if
(
$this
->
mode
!=
backup
::
MODE_COPY
)
{
throw
new
backup_controller_exception
(
'cannot_set_copy_vars_wrong_mode'
);
...
...
@@ -124,8 +129,13 @@ abstract class base_controller extends backup implements loggable {
* Get the course copy data.
*
* @return \stdClass
* @deprecated since Moodle 4.1 MDL-74548 - please do not use this method anymore.
* @todo MDL-75026 This method will be deleted in Moodle 4.5
* @see restore_controller::get_copy()
*/
public
function
get_copy
():
\
stdClass
{
debugging
(
'The method base_controller::get_copy() is deprecated.
Please use restore_controller::get_copy() instead.'
,
DEBUG_DEVELOPER
);
return
$this
->
copy
;
}
}
backup/upgrade.txt
View file @
2ac93db3
...
...
@@ -5,6 +5,10 @@ information provided here is intended especially for developers.
* The class core_backup\copy\copy in backup/util/ui/classes/copy.php has been deprecated, please use copy_helper
from backup/util/helper/copy_helper.class.php instead.
* The method set_copy() in backup/controller/base_controller.class.php has been deprecated, please use a restore
controller for storing copy information instead.
* The method get_copy() in backup/controller/base_controller.class.php has been deprecated, please use get_copy()
from backup/controller/restore_controller.class.php instead.
=== 4.0 ===
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment