This commit is contained in:
Huong Nguyen
2024-01-25 09:07:25 +07:00
3 changed files with 5 additions and 3 deletions
+2 -1
View File
@@ -4957,6 +4957,8 @@ class action_menu_link extends action_link implements renderable {
/**
* The number of instances of this action menu link (and its subclasses).
*
* @deprecated since Moodle 4.4.
* @var int
*/
protected static $instance = 1;
@@ -4985,7 +4987,6 @@ class action_menu_link extends action_link implements renderable {
*/
public function export_for_template(renderer_base $output) {
$data = parent::export_for_template($output);
$data->instance = self::$instance++;
// Ignore what the parent did with the attributes, except for ID and class.
$data->attributes = [];
+2 -2
View File
@@ -27,12 +27,12 @@
}
}}
{{^disabled}}
<a href="{{url}}" class="{{$actionmenulinkclasses}}aabtn {{classes}}{{/actionmenulinkclasses}}" {{#attributes}}{{name}}="{{value}}" {{/attributes}}{{#showtext}}aria-labelledby="actionmenuaction-{{instance}}"{{/showtext}}>
<a href="{{url}}" class="{{$actionmenulinkclasses}}aabtn {{classes}}{{/actionmenulinkclasses}}" {{#attributes}}{{name}}="{{value}}" {{/attributes}}>
{{#icon}}
{{#pix}}{{key}}, {{component}}, {{title}}{{/pix}}
{{/icon}}
{{#showtext}}
<span class="menu-action-text" id="actionmenuaction-{{instance}}">{{{text}}}</span>
<span class="menu-action-text">{{{text}}}</span>
{{/showtext}}
</a>
{{/disabled}}
+1
View File
@@ -38,6 +38,7 @@ information provided here is intended especially for developers.
- `\core\deprecation::emit_deprecation_if_present([self::class, 'some_method']);`
* Added missing deprecation for PARAM_CLEANFILE which was deprecated in Moodle 2.0.
* Login can now utilise new param 'loginredirect' to indicate when to use value set for $CFG->alternateloginurl.
* \action_menu_link::$instance has been deprecated as it is no longer used.
=== 4.3 ===