public function view() { $cnt = new SearchFilesController(); $cnt->search(); $result = Loader::helper('json')->encode($cnt->getSearchResultObject()->getJSONObject()); $this->requireAsset('select2'); $this->set('result', $result); $this->set('searchController', $cnt); }
public function view() { $cnt = new SearchFilesController(); $cnt->search(); $this->set('searchController', $cnt); $result = Loader::helper('json')->encode($cnt->getSearchResultObject()->getJSONObject()); $v = View::getInstance(); $v->requireAsset('core/file-manager'); $v->requireAsset('core/imageeditor'); $this->addFooterItem("<script type=\"text/javascript\">\$(function() { \$('div[data-search=files]').concreteFileManager({result: " . $result . "}); });</script>"); }