Файл: concrete5.7.5.6/concrete/controllers/dialog/file/search.php
Строк: 38
<?php
namespace ConcreteControllerDialogFile;
use ConcreteControllerBackendUserInterface as BackendInterfaceController;
use FilePermissions;
use Loader;
use ConcreteControllerSearchFiles as SearchFilesController;
class Search extends BackendInterfaceController
{
protected $viewPath = '/dialogs/file/search';
protected function canAccess()
{
$cp = FilePermissions::getGlobal();
if ($cp->canSearchFiles() || $cp->canAddFile()) {
return true;
} else {
return false;
}
}
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);
}
}