本文整理匯總了PHP中FormUI::get_xml方法的典型用法代碼示例。如果您正苦於以下問題:PHP FormUI::get_xml方法的具體用法?PHP FormUI::get_xml怎麽用?PHP FormUI::get_xml使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類FormUI
的用法示例。
在下文中一共展示了FormUI::get_xml方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: configure
/**
* Simple plugin configuration
* @return FormUI The configuration form
**/
public function configure()
{
/*
$form = new FormUI( 'test' );
$terms = Vocabulary::get('categories')->get_tree();
$options = array();
foreach($terms as $term) {
$options[$term->id] = $term->term_display;
}
$form->append( 'tree', 'tree', $terms, 'test');
//$form->append( 'tree', 'tree2', 'null:null', 'test', $options);
$form->append( 'submit', 'save', _t( 'Save' ) );
return $form;
*/
$form = new FormUI('test');
$form->append(new FormControlText('name', 'soup__name', 'Soup Name'));
$form->append(new FormControlSelect('type', 'soup__type', 'Soup Type', array('stock', 'cream')));
$form->append(new FormControlSubmit('save', _t('Save')));
$dom = new DOMDocument('1.0');
$dom->preserveWhiteSpace = false;
$dom->formatOutput = true;
$dom->loadXML($form->get_xml()->asXML());
Utils::debug($dom->saveXML());
return $form;
//DB::query('delete from {terms} where id in (14,17)');
/*
if($_SERVER['REQUEST_METHOD'] == 'POST') {
Utils::debug($_POST->get_array_copy_raw());
}
echo <<< FORM
<form method="post">
<input type="text" name="properties[element1][type]" value="textarea">
<input type="text" name="properties[element2][type]" value="select">
<input type="submit" value="Submit">
</form>
FORM;
*/
}