本文整理汇总了PHP中yii\bootstrap\Html::activeTextarea方法的典型用法代码示例。如果您正苦于以下问题:PHP Html::activeTextarea方法的具体用法?PHP Html::activeTextarea怎么用?PHP Html::activeTextarea使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类yii\bootstrap\Html
的用法示例。
在下文中一共展示了Html::activeTextarea方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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);
}
$this->registerPlugin();
}
示例2: run
public function run()
{
if ($this->hasModel()) {
if (!ArrayHelper::getValue($this->options, 'id')) {
$this->options['id'] = Html::getInputId($this->model, $this->attribute);
}
echo Html::activeTextarea($this->model, $this->attribute, $this->options);
} else {
if (!ArrayHelper::getValue($this->options, 'id')) {
$this->options['id'] = Html::getAttributeName($this->name . rand(1, 9999));
}
echo Html::textarea($this->name, $this->value, $this->options);
}
$this->registerAssets();
}
示例3: run
public function run()
{
return Html::activeTextarea($this->model, $this->attribute, $this->options);
}
示例4: run
public function run()
{
parent::run();
return Html::activeTextarea($this->model, $this->attribute, $this->htmlOptions);
}
示例5: run
/**
* Executes the widget.
* @return string the result of widget execution to be outputted.
* @throws InvalidParamException
*/
public function run()
{
$this->view->registerJs('$(function() {
tinyMCE.init({' . substr(Json::encode($this->clientOptions), 1, -1) . ',"file_browser_callback": RoxyFileBrowser});
});', View::POS_HEAD);
$this->view->registerJs('function RoxyFileBrowser(field_name, url, type, win) {
var roxyMce = "' . $this->action . '";
if(roxyMce.indexOf("?") < 0) {
roxyMce += "?type=" + type;
}
else {
roxyMce += "&type=" + type;
}
roxyMce += "&input=" + field_name + "&value=" + win.document.getElementById(field_name).value;
if(tinyMCE.activeEditor.settings.language) {
roxyMce += "&langCode=" + tinyMCE.activeEditor.settings.language;
}
tinyMCE.activeEditor.windowManager.open({
file : roxyMce,
title : "' . (array_key_exists('title', $this->clientOptions) ? $this->clientOptions['title'] : 'RoxyMce') . '",
width : 850,
height : 480,
resizable : "yes",
plugins : "media",
inline : "yes",
close_previous: "no"
}, {
window: win,
input : field_name
});
return false;
}', View::POS_HEAD);
if ($this->model !== null) {
return Html::activeTextarea($this->model, $this->attribute, $this->options);
} else {
return Html::textarea($this->name, $this->value, $this->options);
}
}