/** * Registers a specific dhtmlx widget and the related events */ protected function registerPlugin() { $id = $this->options['id']; /** @var \yii\web\AssetBundle $assetClass */ $bundle = CoreAsset::register($this->view); $bundle->js[] = 'js/i18n/elfinder.' . $this->clientOptions['lang'] . '.js'; $cleanOptions = Json::encode($this->clientOptions); $js[] = "var elf = \$('#{$id}').elfinder({$cleanOptions}).elfinder('instance');"; $this->view->registerJs(implode("\n", $js)); }
<?php use yii\helpers\Html; use yii\helpers\Url; /** * @var \yii\web\View $this * @var string $content */ \maddoger\elfinder\CoreAsset::register($this); $this->beginPage(); ?> <!DOCTYPE html> <html lang="<?php echo Yii::$app->language; ?> "> <head> <meta charset="<?php echo Yii::$app->charset; ?> "/> <title><?php echo Html::encode($this->title); ?> </title> <?php $this->registerCss(' body, html { width: 100%; height: 100%; margin: 0;