Skip to content

Commit

Permalink
Merge branch 'MDL-77541' of https://github.com/paulholden/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
junpataleta authored and sarjona committed Mar 21, 2023
2 parents 930bd50 + 39f6f73 commit 6baff9e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 18 deletions.
21 changes: 3 additions & 18 deletions customfield/field/select/classes/field_controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,9 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

/**
* Class field
*
* @package customfield_select
* @copyright 2018 David Matamoros <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace customfield_select;

defined('MOODLE_INTERNAL') || die;
use coding_exception;

/**
* Class field
Expand Down Expand Up @@ -56,17 +48,10 @@ public function config_form_definition(\MoodleQuickForm $mform) {
}

/**
* Returns the options available as an array.
*
* @param \core_customfield\field_controller $field
* @return array
*
* @deprecated since Moodle 3.10 - MDL-68569 please use $field->get_options
*/
public static function get_options_array(\core_customfield\field_controller $field) : array {
debugging('get_options_array() is deprecated, please use $field->get_options() instead', DEBUG_DEVELOPER);

return $field->get_options();
public static function get_options_array(): void {
throw new coding_exception('get_options_array() is deprecated, please use $field->get_options() instead');
}

/**
Expand Down
4 changes: 4 additions & 0 deletions customfield/upgrade.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
This files describes API changes in /customfield/*,
Information provided here is intended especially for developers.

=== 4.2 ===
* The `\customfield_select\field_controller::get_options_array` method, deprecated since 3.10, has been removed, use
the field instance `get_options` method instead

=== 3.11 ===
* Methods \core_customfield\handler::get_field_config_form() and \core_customfield\handler::setup_edit_page() are no
longer used. Components that define custom fields areas do not need to implement them. Field edit form opens in
Expand Down

0 comments on commit 6baff9e

Please sign in to comment.