Skip to content

Commit

Permalink
MDL-77375 output: Deprecate action_menu::set_constraint()
Browse files Browse the repository at this point in the history
  • Loading branch information
rezaies committed Jul 1, 2023
1 parent 316d79d commit 8207eaa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/outputcomponents.php
Expand Up @@ -4654,10 +4654,12 @@ public function set_menu_left() {
* This is required whenever the action menu is displayed inside any CSS element with the .no-overflow class
* (flexible_table and any of it's child classes are a likely candidate).
*
* @deprecated since Moodle 4.3
* @param string $ancestorselector A snippet of CSS used to identify the ancestor to contrain the dialogue to.
*/
public function set_constraint($ancestorselector) {
$this->attributessecondary['data-constraint'] = $ancestorselector;
debugging('The method set_constraint() is deprecated. Please use the set_boundary() method instead.', DEBUG_DEVELOPER);
$this->set_boundary('window');
}

/**
Expand Down
1 change: 1 addition & 0 deletions lib/upgrade.txt
Expand Up @@ -35,6 +35,7 @@ information provided here is intended especially for developers.
* Introduce a new public function \core_external\util::generate_token_name()
* Legacy (and custom) Behat --skip-passed option has been removed completely. Please, use the standard
--rerun option that provides exactly the same (execution of failed scenarios only).
* The action_menu::set_constraint() method is deprecated. Please use action_menu::set_boundary() instead.

=== 4.2 ===

Expand Down

0 comments on commit 8207eaa

Please sign in to comment.