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


PHP Textarea::setId方法代碼示例

本文整理匯總了PHP中Textarea::setId方法的典型用法代碼示例。如果您正苦於以下問題:PHP Textarea::setId方法的具體用法?PHP Textarea::setId怎麽用?PHP Textarea::setId使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Textarea的用法示例。


在下文中一共展示了Textarea::setId方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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

 public function __construct($widgetUniqName = null, $content = null)
 {
     parent::__construct('about_me_form');
     $this->widgetUniqName = $widgetUniqName;
     $this->setAjax(true);
     $this->setAction(OW::getRouter()->urlFor('BASE_CTRL_ComponentPanel', 'ajaxSaveAboutMe'));
     $input = new Textarea('about_me');
     $input->addAttribute('style', 'width: 93%');
     $input->setId('about_me_widget_input');
     $input->setHasInvitation(true);
     $input->setInvitation(OW::getLanguage()->text('base', 'about_me_widget_inv_text'));
     //$input->setRequired(true);
     $input->setValue($content);
     $this->addElement($input);
     $hidden = new HiddenField('widget_uniq_name');
     $hidden->setValue($widgetUniqName);
     $this->addElement($hidden);
     $submit = new Submit('save');
     //$submit->setLabel(OW::getLanguage()->text('base', 'widget_about_me_save_btn'));
     $this->addElement($submit);
     OW::getDocument()->addOnloadScript('
        window.owForms["about_me_form"].bind("success", function(data){
             OW.info(data.message);
        });
        window.owForms["about_me_form"].reset = false;
     ');
 }
開發者ID:vazahat,項目名稱:dudex,代碼行數:27,代碼來源:about_me_widget.php

示例3: Body

$head->setTitle('PSA - query');
$head->setCss('./css/psa.css');
$head->setJs('./js/PSA.js');
$head->build();
$body = new Body();
$body->build();
include_once './inc/menubar.php';
$body->line('Insert raw sql query : ');
$form = new Form();
$form->setAction('controller.php');
$form->build();
$inp_text = new Textarea();
$inp_text->setRows(15);
$inp_text->setCols(70);
$inp_text->setName('qs');
$inp_text->setId('to_text');
$inp_text->build();
$body->line();
$cmd->build();
$submit->build();
unset($form);
$body->line('<hr />');
$psa = new PDO("sqlite:./data/base.sqlite");
$q = "SELECT * FROM queries ORDER BY datum DESC LIMIT 10";
$tps = $psa->prepare($q);
$tps->execute();
$res = $tps->fetchAll();
if (!$res) {
    $body->line('no queries found.');
} else {
    $table = new Table();
開發者ID:broozer,項目名稱:psa,代碼行數:31,代碼來源:query.php


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