当前位置: 首页>>代码示例>>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;未经允许,请勿转载。