本文整理汇总了PHP中Textarea::getName方法的典型用法代码示例。如果您正苦于以下问题:PHP Textarea::getName方法的具体用法?PHP Textarea::getName怎么用?PHP Textarea::getName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Textarea
的用法示例。
在下文中一共展示了Textarea::getName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testVerificaSeOsDadosForamInseridos
public function testVerificaSeOsDadosForamInseridos()
{
$textarea = new Textarea();
$textarea->setId("textareaMsg");
$textarea->setName("mensagem");
$textarea->setClass("form-control");
$textarea->setProtected("protected");
$textarea->setLabel("Mensagem");
$textarea->setAlert("Erro no field.");
$textarea->setValue("valor");
$textarea->setRows(2);
$this->assertEquals("textareaMsg", $textarea->getId());
$this->assertEquals("mensagem", $textarea->getName());
$this->assertEquals("form-control", $textarea->getClass());
$this->assertEquals("protected", $textarea->getProtected());
$this->assertEquals("Mensagem", $textarea->getLabel());
$this->assertEquals("Erro no field.", $textarea->getAlert());
$this->assertEquals("valor", $textarea->getValue());
$this->assertEquals(2, $textarea->getRows());
}
示例2: __construct
/**
* Class constructor
*
*/
public function __construct($questionId)
{
$this->questionId = (int) $questionId;
$language = OW::getLanguage();
parent::__construct('add_qst_values_form');
$this->setId('add_qst_values_form');
$this->setAjax();
$qstCommand = new HiddenField('command');
$qstCommand->setValue('submit_add_values_form');
$this->addElement($qstCommand);
$qstQuestionId = new HiddenField('questionId');
$qstQuestionId->setValue((int) $questionId);
$this->addElement($qstQuestionId);
$qstValues = new Textarea('qst_add_values');
$qstValues->addAttribute('class', $qstValues->getName());
$qstValues->setLabel($language->text('admin', 'questions_add_values_label'));
$qstValues->setDescription($language->text('admin', 'questions_add_values_description'));
$qstValues->setRequired();
$this->addElement($qstValues);
$qstValuesSubmit = new Submit('add_qst_submit');
$qstValuesSubmit->addAttribute('class', 'ow_button ow_ic_save');
$qstValuesSubmit->setValue($language->text('admin', 'questions_add_values_submit_button'));
$this->addElement($qstValuesSubmit);
if (!OW::getRequest()->isAjax()) {
$js = " owForms['add_qst_values_form'].bind( 'success',\n function( json )\n {\n \$('#add_qst_values_form input[name=questionId]').val('" . $questionId . "');\n \$('#add_qst_values_form input[name=command]').val('submit_add_values_form');\n if( json.result == true )\n {\n window.addValueBox.close();\n\n OW.info(json.notice);\n window.editQuestion.displayAddValues( json.values );\n }\n else\n {\n OW.error(json.error);\n }\n\n } ); ";
OW::getDocument()->addOnloadScript($js);
}
}