当前位置: 首页>>代码示例>>PHP>>正文


PHP Html::activeTextArea方法代码示例

本文整理汇总了PHP中yii\helpers\Html::activeTextArea方法的典型用法代码示例。如果您正苦于以下问题:PHP Html::activeTextArea方法的具体用法?PHP Html::activeTextArea怎么用?PHP Html::activeTextArea使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在yii\helpers\Html的用法示例。


在下文中一共展示了Html::activeTextArea方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: renderInput

 /**
  * Render the text area input
  */
 protected function renderInput()
 {
     if ($this->hasModel()) {
         $input = Html::activeTextArea($this->model, $this->attribute, $this->options);
     } else {
         $input = Html::textArea($this->name, $this->value, $this->options);
     }
     return $input;
 }
开发者ID:altiore,项目名称:yii2-markdown,代码行数:12,代码来源:MarkdownEditor.php

示例2: count

                        <?php 
echo Html::activeInput('email', $commentForm, 'mail', ['placeholder' => 'Your email', 'class' => 'form-control']);
?>
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="form-group">
                        <?php 
echo Html::activeTextInput($commentForm, 'username', ['placeholder' => 'Your username', 'class' => 'form-control']);
?>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <?php 
echo Html::activeTextArea($commentForm, 'content', ['placeholder' => 'Your comment', 'class' => 'form-control']);
?>
                </div>
            <div class="form-group">
                <?php 
echo Html::submitButton('Submit', ['class' => 'btn btn-primary']);
?>
            </div>
        <?php 
echo Html::endForm();
?>

        <h3><?php 
echo count($comments);
?>
 Commentaires</h3>
开发者ID:artoodetoo,项目名称:BlogMVC,代码行数:31,代码来源:view.php

示例3: run

 /**
  * @inheritdoc
  */
 public function run()
 {
     if ($this->hasModel()) {
         echo Html::activeTextArea($this->model, $this->attribute, $this->options);
     } else {
         echo Html::textArea($this->name, $this->value, $this->options);
     }
     $this->registerClientScript();
 }
开发者ID:webtoolsnz,项目名称:yii2-widgets,代码行数:12,代码来源:Wysihtml5.php

示例4: run

 /**
  * @inheritdoc
  */
 public function run()
 {
     MarkdownAsset::register($this->view);
     $this->registerScripts();
     $this->options['id'] = $this->id;
     if ($this->hasModel()) {
         echo Html::activeTextArea($this->model, $this->attribute, $this->options);
     } else {
         echo Html::textArea($this->name, $this->value, $this->options);
     }
 }
开发者ID:iisns,项目名称:yii2-simplemde-markdown,代码行数:14,代码来源:Markdown.php

示例5: run

 public function run()
 {
     LeptureEditorAsset::register($this->view);
     $this->registerScripts();
     $this->options['id'] = $this->id;
     if ($this->hasModel()) {
         $textarea = Html::activeTextArea($this->model, $this->attribute, $this->options);
     } else {
         $textarea = Html::textArea($this->name, $this->value, $this->options);
     }
     echo '<div class="lepture">' . $textarea . '</div>';
 }
开发者ID:dungphanxuan,项目名称:yii2-lepture-editor,代码行数:12,代码来源:LeptureEditorWidget.php

示例6: tinymce

 public function tinymce($options = [])
 {
     $htmlOptions = isset($options['htmlOptions']) ? $options['htmlOptions'] : [];
     $htmlOptions = array_merge($this->inputOptions, $htmlOptions);
     $this->adjustLabelFor($hmtlOptions);
     $this->parts['{input}'] = Html::activeTextArea($this->model, $this->attribute, $htmlOptions);
     $id = Html::getInputId($this->model, $this->attribute);
     $params = \yii\helpers\ArrayHelper::merge(["selector" => "#" . $id, "theme" => "modern", "plugins" => ["advlist autolink lists link image charmap print preview hr anchor pagebreak", "searchreplace wordcount visualblocks visualchars code fullscreen", "insertdatetime media nonbreaking save table contextmenu directionality", "emoticons template paste textcolor"], "external_plugins" => ["jbimages" => "/js/tinymce/plugins/jbimages/plugin.js", "placeholder" => "/js/tinymce/plugins/placeholder/plugin.js"], "convert_newlines_to_brs" => false, "paste_postprocess" => new \yii\web\JsExpression("function(plugin, args) {\n                args.node.innerHTML = args.node.innerHTML.replace(/(<p><\\/p>)/ig, '').replace(/(<p>&nbsp;<\\/p>)/ig, '').replace(/<p><br\\/?>\\s*<\\/p>/ig, '');\n                args.node.innerHTML = args.node.innerHTML.replace(/<a \\s*<\\/a>/ig, '');\n            }"), "templates" => [], "invalid_elements" => "script,iframe", "height" => 300, "language" => "ru", "language_url" => "/js/tinymce/langs/ru.js", "relative_urls" => false, "toolbar" => "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | forecolor backcolor | print preview media jbimages", "image_advtab" => "true"], isset($options['params']) ? $options['params'] : []);
     \yii::$app->view->registerJS('
         tinymce.init(' . \yii\helpers\Json::encode($params) . ');
     ');
     return $this;
 }
开发者ID:alexeevdv,项目名称:yii2-admin-lte,代码行数:13,代码来源:ActiveField.php

示例7: run

 /**
  * @return string
  */
 public function run()
 {
     $this->registerAsset();
     $this->registerCsrf();
     $this->registerPlugins();
     $this->registerLanguage();
     $this->registerClientScript();
     if ($this->hasModel()) {
         return Html::activeTextArea($this->model, $this->attribute, $this->options);
     } else {
         return Html::textArea($this->name, $this->value, $this->options);
     }
 }
开发者ID:apurey,项目名称:cmf,代码行数:16,代码来源:ImperaviWidget.php

示例8: run

 public function run()
 {
     EpiceditorAssets::register($this->view);
     $this->registerScripts();
     //text area should be hidden, and DIV should be shown
     $this->textareaHtmlOptions = ArrayHelper::merge($this->textareaHtmlOptions, ['style' => 'display:none']);
     $this->textareaHtmlOptions['id'] = $this->options['textarea'];
     if ($this->hasModel()) {
         echo Html::activeTextArea($this->model, $this->attribute, $this->textareaHtmlOptions);
     } else {
         echo Html::textArea($this->name, $this->value, $this->textareaHtmlOptions);
     }
     $this->divHtmlOptions = ArrayHelper::merge($this->divHtmlOptions, ['id' => $this->options['container']]);
     echo Html::tag('div', '', $this->divHtmlOptions);
 }
开发者ID:ijackua,项目名称:yii2-epiceditor-widget,代码行数:15,代码来源:Epiceditor.php

示例9: run

 public function run()
 {
     if ($this->hasModel()) {
         echo Html::activeTextArea($this->model, $this->attribute, $this->options);
     } else {
         echo Html::textArea($this->name, $this->value, $this->options);
     }
     if (!isset($this->options['id'])) {
         $id = $this->hasModel() ? Html::getInputId($this->model, $this->attribute) : $this->getId();
     } else {
         $id = $this->options['id'];
     }
     $this->setOptions();
     $options = Json::encode($this->options);
     $this->registerEditorJs($id, $options);
 }
开发者ID:anandhugopi,项目名称:helpsystem,代码行数:16,代码来源:DMEditor.php

示例10:

$fieldExtra = '';
if (!empty($model->errors['phone'])) {
    $fieldExtra = 'has-feedback has-error';
}
echo Html::beginTag('div', ['class' => 'col-sm-6 form-group ' . $fieldExtra]);
echo Html::activeLabel($model, 'phone');
echo Html::activeTextInput($model, 'phone', ['class' => 'form-control']);
echo Html::error($model, 'phone', ['class' => 'help-inline text-danger']);
echo Html::endTag('div');
echo Html::endTag('div');
echo Html::beginTag('div', ['class' => 'row']);
$fieldExtra = '';
if (!empty($model->errors['note'])) {
    $fieldExtra = 'has-feedback has-error';
}
echo Html::beginTag('div', ['class' => 'col-sm-6 form-group ' . $fieldExtra]);
echo Html::activeLabel($model, 'note');
echo Html::activeTextArea($model, 'note', ['class' => 'form-control']);
echo Html::error($model, 'note', ['class' => 'help-inline text-danger']);
echo Html::endTag('div');
echo Html::beginTag('div', ['class' => 'col-sm-6']);
echo Html::beginTag('div', ['class' => 'form-group ']);
echo Html::activeCheckbox($model, 'is_technical', []);
echo Html::endTag('div');
echo Html::beginTag('div', ['class' => 'form-group ']);
echo Html::activeCheckbox($model, 'is_billing', []);
echo Html::endTag('div');
echo Html::endTag('div');
echo Html::endTag('div');
echo Html::endTag('div');
echo Html::endForm();
开发者ID:psesd,项目名称:sensor-hub,代码行数:31,代码来源:create.php

示例11: run

 public function run()
 {
     $input = $this->hasModel() ? Html::activeTextArea($this->model, $this->attribute, $this->options) : Html::textArea($this->name, $this->value, $this->options);
     echo $input;
     $this->registerClientScript();
 }
开发者ID:claudejanz,项目名称:yii2-wysihtml5,代码行数:6,代码来源:Wysihtml5.php

示例12: renderInput

 /**
  * Render the text area input
  */
 protected function renderInput()
 {
     if ($this->hasModel()) {
         $input = Html::activeTextArea($this->model, $this->attribute, $this->options);
     } else {
         $input = Html::textArea($this->name, $this->value, $this->options);
     }
     Html::addCssClass($this->previewOptions, 'hidden');
     $preview = Html::tag('div', '', $this->previewOptions);
     return $input . "\n" . $preview;
 }
开发者ID:kangqf,项目名称:yii2-markdown,代码行数:14,代码来源:MarkdownEditor.php

示例13:

								<div>
									<label for="">Название объявления</label>
								</div>
								<div>
									<?php 
echo Html::activeTextInput($model, 'name', ['v-model' => "name"]);
?>
								</div>
							</div><!-- end wrap -->
							<div class="input-wrap">
								<div>
									<label for="">Текст объявления</label>
								</div>
								<div>
									<?php 
echo Html::activeTextArea($model, 'text', ['v-model' => "text_area"]);
?>
								</div>
							</div><!-- end wrap -->
							<div class="input-wrap">
								<div>
									<label for="">Цена</label>
								</div>
								<div>
									<?php 
foreach ($model->typesPrice as $tprice) {
    ?>
										<div class="priceBlock general"> 
											<?php 
    echo Html::activeTextInput($model, 'price[' . $tprice->id . ']', ['class' => ["priceText"], 'v-model' => "price" . $tprice->id]);
    ?>
开发者ID:a7000q,项目名称:yasvoboden,代码行数:31,代码来源:_formRecord.php

示例14: run

 public function run()
 {
     return Html::activeTextArea($this->model, $this->attribute, $this->options);
 }
开发者ID:erycamel,项目名称:yiisms,代码行数:4,代码来源:TextCounterWidget.php


注:本文中的yii\helpers\Html::activeTextArea方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。