2 // This file is part of Moodle - http://moodle.org/
4 // Moodle is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
9 // Moodle is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
14 // You should have received a copy of the GNU General Public License
15 // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
19 * editor format form element
21 * Contains HTML class for a editor format drop down element
24 * @copyright 2007 Jamie Pratt <me@jamiep.org>
25 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
29 require_once "$CFG->libdir/form/select.php";
32 * editor format form element
34 * HTML class for a editor format drop down element
37 * @copyright 2007 Jamie Pratt <me@jamiep.org>
38 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
39 * @deprecated since Moodle 2.0 Please do not use this form element.
40 * @todo MDL-31294, remove this element
41 * @see MoodleQuickForm_editor
43 class MoodleQuickForm_format
extends MoodleQuickForm_select
{
48 * @param string $elementName Select name attribute
49 * @param mixed $elementLabel Label(s) for the select
50 * @param mixed $attributes Either a typical HTML attribute string or an associative array
51 * @param mixed $useHtmlEditor Either a string returned from can_use_html_editor() or false for no html editor
52 * default 'detect' tells element to use html editor if it is available.
54 function MoodleQuickForm_format($elementName=null, $elementLabel=null, $attributes=null, $useHtmlEditor=null)
56 throw new coding_exception('MFORMS: Coding error, text formats are handled only by new editor element.');