public function init() { $this->roots = []; if (\Yii::$app->user->can(CmsManager::PERMISSION_ELFINDER_USER_FILES)) { $this->roots[] = ['class' => 'skeeks\\cms\\helpers\\elfinder\\UserPath', 'path' => 'uploads/users/{id}', 'name' => 'Личные файлы']; } if (\Yii::$app->user->can(CmsManager::PERMISSION_ELFINDER_COMMON_PUBLIC_FILES)) { $this->roots[] = ['path' => 'uploads/inbox', 'name' => 'Общие файлы']; } parent::init(); }
public function init() { $this->roots = []; if (\Yii::$app->user->can(CmsManager::PERMISSION_ELFINDER_USER_FILES)) { $this->roots[] = ['class' => 'skeeks\\cms\\helpers\\elfinder\\UserPath', 'path' => 'uploads/users/{id}', 'name' => 'Личные файлы']; } if (\Yii::$app->user->can(CmsManager::PERMISSION_ELFINDER_COMMON_PUBLIC_FILES)) { $this->roots[] = ['path' => 'uploads/inbox', 'name' => 'Общие файлы']; } if (\Yii::$app->user->can(CmsManager::PERMISSION_ELFINDER_ADDITIONAL_FILES)) { $this->roots[] = ['basePath' => ROOT_DIR, 'path' => '/', 'name' => 'ROOT_DIR']; $this->roots[] = ['baseUrl' => '@web', 'basePath' => '@webroot', 'path' => '/', 'name' => 'Корень (robots.txt тут)']; } parent::init(); \Yii::$app->cmsToolbar->enabled = false; }
public function init() { $this->roots = []; if (\Yii::$app->user->can(CmsManager::PERMISSION_ELFINDER_USER_FILES)) { $this->roots[] = ['class' => 'skeeks\\cms\\helpers\\elfinder\\UserPath', 'path' => 'uploads/users/{id}', 'name' => 'Личные файлы']; } if (\Yii::$app->user->can(CmsManager::PERMISSION_ELFINDER_COMMON_PUBLIC_FILES)) { $this->roots[] = ['path' => 'uploads/inbox', 'name' => 'Общие файлы']; } if (\Yii::$app->user->can(CmsManager::PERMISSION_ELFINDER_ADDITIONAL_FILES)) { $this->roots[] = ['basePath' => ROOT_DIR, 'path' => '/', 'name' => 'ROOT_DIR']; $this->roots[] = ['baseUrl' => '@web', 'basePath' => '@webroot', 'path' => '/', 'name' => 'Корень (robots.txt тут)']; $this->roots[] = ['class' => 'mihaildev\\elfinder\\UserPath', 'path' => 'uploads/users/{id}', 'name' => 'Личные файлы']; $this->roots[] = ['basePath' => '@frontend', 'path' => 'views', 'name' => 'frontend/views']; $this->roots[] = ['basePath' => '@frontend', 'path' => 'runtime', 'name' => 'frontend/runtime']; $this->roots[] = ['basePath' => '@console', 'path' => 'runtime', 'name' => 'console/runtime']; $this->roots[] = ['basePath' => '@webroot', 'path' => 'assets', 'name' => 'Временные js и css']; $this->roots[] = ['basePath' => BACKUP_DIR, 'name' => 'Бэкапы']; } parent::init(); \Yii::$app->cmsToolbar->enabled = false; }