MDL-77375 output: Deprecate action_menu::set_constraint()

This commit is contained in:
Shamim Rezaie 2023-05-26 04:06:01 +10:00
parent 316d79d038
commit 8207eaa5d3
2 changed files with 4 additions and 1 deletions

View file

@ -4654,10 +4654,12 @@ class action_menu implements renderable, templatable {
* This is required whenever the action menu is displayed inside any CSS element with the .no-overflow class * 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). * (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. * @param string $ancestorselector A snippet of CSS used to identify the ancestor to contrain the dialogue to.
*/ */
public function set_constraint($ancestorselector) { 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');
} }
/** /**

View file

@ -35,6 +35,7 @@ information provided here is intended especially for developers.
* Introduce a new public function \core_external\util::generate_token_name() * 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 * 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). --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 === === 4.2 ===