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


PHP TbHtml::activeTextArea方法代碼示例

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


在下文中一共展示了TbHtml::activeTextArea方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: foreach

<?php 
$profileFields = Profile::getFields();
if ($profileFields) {
    foreach ($profileFields as $field) {
        ?>
	<div class='row'>
		<?php 
        echo $form->labelEx($profile, $field->varname);
        ?>
		<?php 
        if ($widgetEdit = $field->widgetEdit($profile)) {
            echo $widgetEdit;
        } elseif ($field->range) {
            echo $form->dropDownList($profile, $field->varname, Profile::range($field->range));
        } elseif ($field->field_type == 'TEXT') {
            echo TbHtml::activeTextArea($profile, $field->varname, array('rows' => 6, 'cols' => 50));
        } else {
            echo $form->textField($profile, $field->varname, array('size' => 60, 'maxlength' => $field->field_size ? $field->field_size : 255));
        }
        ?>
		<?php 
        echo $form->error($profile, $field->varname);
        ?>
	</div>
			<?php 
    }
}
?>
	

<?php 
開發者ID:Rudianasaja,項目名稱:cycommerce,代碼行數:31,代碼來源:_form.php

示例2: testActiveTextArea

 public function testActiveTextArea()
 {
     $I = $this->codeGuy;
     $html = TbHtml::activeTextArea(new Dummy(), 'textarea', array('class' => 'textarea'));
     $textarea = $I->createNode($html, 'textarea');
     $I->seeNodeAttributes($textarea, array('class' => 'textarea', 'id' => 'Dummy_textarea', 'name' => 'Dummy[textarea]'));
     $I->seeNodeText($textarea, 'Textarea text');
 }
開發者ID:AlexanderGrant1,項目名稱:AC41004,代碼行數:8,代碼來源:TbHtmlTest.php

示例3: textArea

 /**
  * Renders a text area for a model attribute.
  * @param CModel $model the data model.
  * @param string $attribute the attribute.
  * @param array $htmlOptions additional HTML attributes.
  * @return string the generated text area.
  * @see TbHtml::activeTextArea
  */
 public function textArea($model, $attribute, $htmlOptions = array())
 {
     return TbHtml::activeTextArea($model, $attribute, $htmlOptions);
 }
開發者ID:imanifaiz,項目名稱:angular-music-db,代碼行數:12,代碼來源:TbActiveForm.php

示例4: textArea

 /**
  * Renders a text area for a model attribute.
  * This method is a wrapper of {@link TbHtml::activeTextArea}.
  * Please check {@link TbHtml::activeTextArea} for detailed information
  * about the parameters for this method.
  * @param CModel $model the data model
  * @param string $attribute the attribute
  * @param array $htmlOptions additional HTML attributes.
  * @return string the generated text area
  */
 public function textArea($model, $attribute, $htmlOptions = array())
 {
     return $this->wrapControl(TbHtml::activeTextArea($model, $attribute, $htmlOptions));
 }
開發者ID:yii-twbs,項目名稱:yiistrap,代碼行數:14,代碼來源:TbActiveForm.php

示例5:

		<?php 
echo $form->labelEx($description, 'meta_description');
?>
		<?php 
echo TbHtml::activeTextArea($description, 'meta_description');
?>
		<?php 
echo $form->error($description, 'meta_description');
?>
		</div><!-- row -->
		<div class="row">
		<?php 
echo $form->labelEx($description, 'meta_keyword');
?>
		<?php 
echo TbHtml::activeTextArea($description, 'meta_keyword');
?>
		<?php 
echo $form->error($description, 'meta_keyword');
?>
		</div><!-- row -->
		<div class="row">
		<?php 
echo $form->labelEx($model, 'store_id');
?>
		<?php 
echo $form->dropDownList($model, 'store_id', TbHtml::listData(Store::model()->findAll(array('order' => 'name')), 'id', 'name'));
?>
		<?php 
echo $form->error($model, 'store_id');
?>
開發者ID:Rudianasaja,項目名稱:cycommerce,代碼行數:31,代碼來源:_form.php

示例6: testActiveTextArea

 public function testActiveTextArea()
 {
     $I = $this->codeGuy;
     $html = TbHtml::activeTextArea(new Dummy(), 'textarea', array('class' => 'textarea'));
     $textarea = $I->createNode($html, 'textarea.form-control');
     $I->seeNodeAttributes($textarea, array('class' => 'textarea form-control', 'id' => 'Dummy_textarea', 'name' => 'Dummy[textarea]'));
     $I->seeNodeText($textarea, 'Textarea text');
     $html = TbHtml::activeTextArea(new Dummy(), 'textarea', array('xs' => 6, 'md' => 6, 'class' => 'textarea'));
     $div = $I->createNode($html, 'div');
     $I->seeNodeCssClass($div, 'col-xs-6');
     $I->seeNodeCssClass($div, 'col-md-6');
     $textarea = $div->filter('textarea');
     $I->seeNodeAttributes($textarea, array('class' => 'textarea form-control', 'id' => 'Dummy_textarea', 'name' => 'Dummy[textarea]'));
     $I->seeNodeText($textarea, 'Textarea text');
 }
開發者ID:noonnightcoder,項目名稱:bakou-pos-apsara,代碼行數:15,代碼來源:TbHtmlTest.php


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