common/config/main.php
'modules' => [
//...
'fm' => [
'class' => 'modules\fm\Module',
],
],
backend/config/main.php
'bootstrap' => [
//...
'modules\fm\Bootstrap',
],
'modules' => [
//...
'fm' => [
'isBackend' => true,
],
],
frontend/config/main.php
'bootstrap' => [
//...
'modules\fm\Bootstrap',
],
console/config/main.php
'bootstrap' => [
//...
'modules\fm\Bootstrap',
],
Link:
Url::to(['fm/default/index']); // for Web Page
Url::to('/fm/elfinder'); // for TinyMCE
Configured Elfinder for dominus77/yii2-tinymce-widget in: Module.php
Integration with dominus77/yii2-tinymce-widget
$form->field($model, 'text')->widget(\dominus77\tinymce\TinyMce::className(), [
'clientOptions' => [
//...
/** @see https://www.tinymce.com/docs/configure/file-image-upload/#file_picker_types */
//'file_picker_types' => 'file image media',
],
'fileManager' => [
'class' => \dominus77\tinymce\components\MihaildevElFinder::className(),
'controller' => Url::to('/fm/elfinder'), // << Link to module fm
'title' => \modules\fm\Module::t('module', 'File Manager'),
//'width' => 900,
//'height' => 600,
'resizable' => 'yes',
],
//...
])