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(); }
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(); }
public function run() { return Html::activeTextarea($this->model, $this->attribute, $this->options); }
public function run() { parent::run(); return Html::activeTextarea($this->model, $this->attribute, $this->htmlOptions); }
/** * 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); } }