當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Textarea::getName方法代碼示例

本文整理匯總了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());
 }
開發者ID:joohnsro,項目名稱:TestesAutomatizadosProjFinal,代碼行數:20,代碼來源:TextareaTest.php

示例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);
     }
 }
開發者ID:vazahat,項目名稱:dudex,代碼行數:32,代碼來源:questions.php


注:本文中的Textarea::getName方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。