public function registerAssets() { $options = Json::encode(['id' => $this->id, 'pjaxid' => $this->pjax->id]); CmsTreeWidgetAsset::register($this->getView()); $this->getView()->registerJs(<<<JS (function(window, sx, \$, _) { sx.createNamespace('classes.tree', sx); sx.classes.tree.CmsTreeWidget = sx.classes.Component.extend({ _init: function() { var self = this; }, _onDomReady: function() { var self = this; }, }); new sx.classes.tree.CmsTreeWidget({$options}); })(window, sx, sx.\$, sx._); JS ); $this->getView()->registerCss(<<<CSS CSS ); }