We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Здравствуйте, проверьте, пожалуйста, документацию, судя по всему в куске кода, который надо вставлять в конфиг - ошибка.
В примере: 'controllerMap' => [ 'elfinder' => [ 'class' => 'mihaildev\elfinder\PathController', 'access' => ['@'], 'root' => [ 'path' => 'files', 'name' => 'Files' ], 'watermark' => [ 'source' => __DIR__.'/logo.png', // Path to Water mark image 'marginRight' => 5, // Margin right pixel 'marginBottom' => 5, // Margin bottom pixel 'quality' => 95, // JPEG image save quality 'transparency' => 70, // Water mark image transparency ( other than PNG ) 'targetType' => IMG_GIF|IMG_JPG|IMG_PNG|IMG_WBMP, // Target image formats ( bit-field ) 'targetMinPixel' => 200 // Target image minimum pixel size ] ] ], На сколько я понял, то 'class' => 'mihaildev\elfinder\PathController', должен быть на уровень выше
'controllerMap' => [ 'elfinder' => [ 'class' => 'mihaildev\elfinder\PathController', 'access' => ['@'], 'root' => [ 'path' => 'files', 'name' => 'Files' ], 'watermark' => [ 'source' => __DIR__.'/logo.png', // Path to Water mark image 'marginRight' => 5, // Margin right pixel 'marginBottom' => 5, // Margin bottom pixel 'quality' => 95, // JPEG image save quality 'transparency' => 70, // Water mark image transparency ( other than PNG ) 'targetType' => IMG_GIF|IMG_JPG|IMG_PNG|IMG_WBMP, // Target image formats ( bit-field ) 'targetMinPixel' => 200 // Target image minimum pixel size ] ] ],
'class' => 'mihaildev\elfinder\PathController',
Иначе просто выскакивает ошибка
An Error occurred while handling another error: yii\base\InvalidConfigException: Unknown component ID: request in Z:\domains\westy.dev\vendor\yiisoft\yii2\di\ServiceLocator.php:139 Stack trace: #0 Z:\domains\westy.dev\vendor\yiisoft\yii2\base\Module.php(724): yii\di\ServiceLocator->get('request', true) #1 Z:\domains\westy.dev\vendor\yiisoft\yii2\web\Application.php(160): yii\base\Module->get('request') #2 Z:\domains\westy.dev\vendor\yiisoft\yii2\base\Component.php(133): yii\web\Application->getRequest() #3 Z:\domains\westy.dev\vendor\yiisoft\yii2\di\ServiceLocator.php(77): yii\base\Component->__get('request') #4 Z:\domains\westy.dev\vendor\yiisoft\yii2\web\ErrorHandler.php(488): yii\di\ServiceLocator->__get('request') #5 Z:\domains\westy.dev\vendor\yiisoft\yii2\web\ErrorHandler.php(104): yii\web\ErrorHandler->shouldRenderSimpleHtml() #6 Z:\domains\westy.dev\vendor\yiisoft\yii2\base\ErrorHandler.php(111): yii\web\ErrorHandler->renderException(Object(yii\base\InvalidConfigException)) #7 [internal function]: yii\base\ErrorHandler->handleException(Object(yii\base\InvalidConfigException)) #8 {main} Previous exception: yii\base\InvalidConfigException: The configuration for the "controllerMap" component must contain a "class" element. in Z:\domains\westy.dev\vendor\yiisoft\yii2\di\ServiceLocator.php:205 Stack trace: #0 Z:\domains\westy.dev\vendor\yiisoft\yii2\di\ServiceLocator.php(261): yii\di\ServiceLocator->set('controllerMap', Array) #1 Z:\domains\westy.dev\vendor\yiisoft\yii2\base\Component.php(174): yii\di\ServiceLocator->setComponents(Array) #2 Z:\domains\westy.dev\vendor\yiisoft\yii2\BaseYii.php(532): yii\base\Component->__set('components', Array) #3 Z:\domains\westy.dev\vendor\yiisoft\yii2\base\BaseObject.php(106): yii\BaseYii::configure(Object(yii\web\Application), Array) #4 Z:\domains\westy.dev\vendor\yiisoft\yii2\base\Application.php(206): yii\base\BaseObject->__construct(Array) #5 Z:\domains\westy.dev\backend\web\index.php(17): yii\base\Application->__construct(Array) #6 {main}
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Здравствуйте, проверьте, пожалуйста, документацию, судя по всему в куске кода, который надо вставлять в конфиг - ошибка.
В примере:
'controllerMap' => [ 'elfinder' => [ 'class' => 'mihaildev\elfinder\PathController', 'access' => ['@'], 'root' => [ 'path' => 'files', 'name' => 'Files' ], 'watermark' => [ 'source' => __DIR__.'/logo.png', // Path to Water mark image 'marginRight' => 5, // Margin right pixel 'marginBottom' => 5, // Margin bottom pixel 'quality' => 95, // JPEG image save quality 'transparency' => 70, // Water mark image transparency ( other than PNG ) 'targetType' => IMG_GIF|IMG_JPG|IMG_PNG|IMG_WBMP, // Target image formats ( bit-field ) 'targetMinPixel' => 200 // Target image minimum pixel size ] ] ],
На сколько я понял, то
'class' => 'mihaildev\elfinder\PathController',
должен быть на уровень вышеИначе просто выскакивает ошибка
The text was updated successfully, but these errors were encountered: