本文整理汇总了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
示例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');
}
示例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);
}
示例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));
}
示例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');
?>
示例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');
}