Details
-
Sub-task
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.6
-
MOODLE_26_STABLE
-
MOODLE_27_STABLE
-
MDL-41690-master -
-
3
-
BACKEND Sprint 8
Description
The following methods of class cm_info were public before Moodle 2.6. They are changed to private in Moodle 2.6 but still can be accessed publicly via magic __call() method.
They have to display deprecation message if accessed from outside of the class in 2.7 and in 2.8 the array $standardmethods and function __call() need to be completely removed.
Functions are still used as getter methods for the corresponding properties
/**
|
* List of methods with no arguments that were public prior to Moodle 2.6.
|
*
|
* They can still be accessed publicly via magic __call() function with no warnings
|
* but are not listed in the class methods list.
|
* For the consistency of the code it is better to use corresponding properties.
|
*
|
* These methods be deprecated completely in later versions.
|
*
|
* @var array $standardmethods
|
*/
|
private static $standardmethods = array(
|
// Following methods are not recommended to use because there have associated read-only properties.
|
'get_url',
|
'get_content',
|
'get_extra_classes',
|
'get_on_click',
|
'get_custom_data',
|
'get_after_link',
|
'get_after_edit_icons',
|
// Method obtain_dynamic_data() should not be called from outside of this class but it was public before Moodle 2.6.
|
'obtain_dynamic_data',
|
);
|
Attachments
Issue Links
- has been marked as being related by
-
MDL-41192 Performance and usability improvements in class cm_info
-
- Closed
-