本文整理匯總了PHP中question_edit_form::definition方法的典型用法代碼示例。如果您正苦於以下問題:PHP question_edit_form::definition方法的具體用法?PHP question_edit_form::definition怎麽用?PHP question_edit_form::definition使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類question_edit_form
的用法示例。
在下文中一共展示了question_edit_form::definition方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: definition
protected function definition()
{
global $PAGE;
$jsmodule = array('name' => 'qtype_coderunner', 'fullpath' => '/question/type/coderunner/module.js', 'requires' => array('base', 'widget', 'io', 'node-menunav'));
$mform = $this->_form;
$this->make_questiontype_panel($mform);
$this->make_customisation_panel($mform);
$this->make_advanced_customisation_panel($mform);
$PAGE->requires->js_init_call('M.qtype_coderunner.setupAllTAs', array(), false, $jsmodule);
$PAGE->requires->js_init_call('M.qtype_coderunner.initEditForm', array(), false, $jsmodule);
load_ace_scripts();
// May be needed e.g. for template editing
parent::definition($mform);
// The supercalss adds the "General" stuff
}
示例2: definition
protected function definition()
{
parent::definition();
$mform = $this->_form;
$fixdollars = $mform->createElement('checkbox', 'fixdollars', stack_string('fixdollars'), stack_string('fixdollarslabel'));
$mform->insertElementBefore($fixdollars, 'buttonar');
$mform->addHelpButton('fixdollars', 'fixdollars', 'qtype_stack');
$mform->closeHeaderBefore('fixdollars');
// There is no un-closeHeaderBefore, so fake it.
$closebeforebuttonarr = array_search('buttonar', $mform->defaultRenderer()->_stopFieldsetElements);
if ($closebeforebuttonarr !== false) {
unset($mform->defaultRenderer()->_stopFieldsetElements[$closebeforebuttonarr]);
}
}