mrstroz / yii2-wavecms
Yii2 WaveCMS
Installs: 310
Dependents: 5
Suggesters: 0
Security: 0
Stars: 3
Watchers: 1
Forks: 0
Open Issues: 10
Type:yii2-extension
Requires
Requires (Dev)
- php: >=5.4.0
- yiisoft/yii2: ~2.0.6
- dev-master
- 0.2.14
- 0.2.13
- 0.2.12
- 0.2.11
- 0.2.10
- 0.2.9
- 0.2.8
- 0.2.7
- 0.2.6
- 0.2.5
- 0.2.4
- 0.2.3
- 0.2.2
- 0.2.1
- 0.2.0
- 0.1.5
- 0.1.4
- 0.1.3.2
- 0.1.3.1
- 0.1.3
- 0.1.2
- 0.1.1
- 0.1.0
- 0.0.1
- dev-dependabot/npm_and_yarn/asset/media/qs-6.3.3
- dev-dependabot/npm_and_yarn/asset/media/decode-uri-component-0.2.2
- dev-dependabot/npm_and_yarn/asset/media/minimist-1.2.6
- dev-dependabot/npm_and_yarn/asset/media/path-parse-1.0.7
- dev-dependabot/npm_and_yarn/asset/media/tar-2.2.2
- dev-dependabot/npm_and_yarn/asset/media/hosted-git-info-2.8.9
- dev-dependabot/npm_and_yarn/asset/media/y18n-3.2.2
- dev-dependabot/npm_and_yarn/asset/media/ini-1.3.7
- dev-dependabot/npm_and_yarn/asset/media/node-sass-4.14.1
This package is auto-updated.
Last update: 2025-03-07 14:41:37 UTC
README
Yii2 WaveCMS
It is recommended to install on Yii 2 Advanced Project Template
Installation
The preferred way to install this extension is through composer.
Run
composer require --prefer-source "mrstroz/yii2-wavecms" "~0.2.5"
or add
"mrstroz/yii2-wavecms": "~0.2.5"
to the require section of your composer.json
file.
Required steps
- Update
backend/config/main.php
(Yii2 advanced template)
'modules' => [ // ... 'wavecms' => [ 'class' => 'mrstroz\wavecms\Module', 'languages' => ['en','pl'] ], ], // ... 'components' => [ // ... 'user' => [ 'identityClass' => 'mrstroz\wavecms\models\User', //Change identity class // ... ], ] // ... 'controllerMap' => [ 'elfinder' => [ 'class' => 'mihaildev\elfinder\Controller', 'access' => ['@'], 'disabledCommands' => ['netmount'], 'roots' => [ [ 'baseUrl'=>'@frontWeb', 'basePath'=>'@frontWebroot', 'path' => 'userfiles', 'name' => 'Files' ] ] ] ]
-
Uncomment
urlManager
section inbackend/config/main.php
and add .htaccess -
Update
common/config/main.php
(Yii2 advanced template)
'components' => [ 'authManager' => [ 'class' => 'yii\rbac\DbManager', ], ]
- Run migration
Add the migrationPath
in console/config/main.php
and run yii migrate
:
// Add migrationPaths to console config: 'controllerMap' => [ 'migrate' => [ 'class' => 'yii\console\controllers\MigrateController', 'migrationPath' => [ '@app/migrations', '@yii/rbac/migrations/', '@yii/i18n/migrations/', '@vendor/mrstroz/yii2-wavecms/migrations/', '@vendor/yii2mod/yii2-settings/migrations/' ], ], ],
Or run migrates directly
yii migrate --migrationPath=@yii/rbac/migrations
yii migrate --migrationPath=@yii/i18n/migrations/
yii migrate --migrationPath=@vendor/mrstroz/yii2-wavecms/migrations
yii migrate --migrationPath=@vendor/yii2mod/yii2-settings/migrations
- Update
console/config/main.php
(Yii2 advanced template)
'modules' => [ // ... 'wavecms' => [ 'class' => 'mrstroz\wavecms\Module' ], ],
- Add new WaveCMS user
yii wavecms/create [email] [password]
Overriding classes
Classes can be overridden by:
classMap
attribute for WaveCMS module
'modules' => [ // ... 'wavecms' => [ 'class' => 'mrstroz\wavecms\Module', 'languages' => ['en','pl'], 'classMap' => [ 'User' => \common\models\User::class ] ], ],
- Yii2 Dependency Injection configuration in
backend/config/main.php
'container' => [ 'definitions' => [ mrstroz\wavecms\models\User::class => common\models\User::class ], ],
Overriding controllers
Use controllerMap
attribute for WaveCMS module to override controllers
'modules' => [ // ... 'wavecms' => [ 'class' => 'mrstroz\wavecms\Module', 'languages' => ['en','pl'], 'controllerMap' => [ 'user' => 'backend\controllers\UserController' ] ], ],
Overriding views
Use themes for override views
'components' => [ // ... 'view' => [ 'theme' => [ 'basePath' => '@app/themes/basic', 'baseUrl' => '@web/themes/basic', 'pathMap' => [ '@wavecms/views' => '@app/themes/basic/wavecms', ], ], ], // ... ],
Multilingual
-
Many languages can be handle by yii2-localeurls. Follow all steps from Locale Urls installation.
-
Set CMS languages in
backend/config/main.php
for WaveCMS module
'modules' => [ // ... 'wavecms' => [ 'class' => 'mrstroz\wavecms\Module', 'languages' => ['en','pl'] ], // ... ]
- Configure message sources see docs
'components' => [ // ... 'i18n' => [ 'translations' => [ '*' => [ 'class' => 'yii\i18n\DbMessageSource', ], ], ], ],
- Use
message
command to add translations added in templates
yii message/config-template path/to/config.php
yii message path/to/config.php
Shared hosting
For shared hosting, copy and replace environments
folder from vendor/mrstroz/wavecms
and type php init
. Frontend url: /public
, Backend url: /public/admin
Available WaveCMS modules
Page (home page, text pages, menu) - https://github.com/mrstroz/yii2-wavecms-page
Example (example module) - https://github.com/mrstroz/yii2-wavecms-example
Form (form module) - https://github.com/mrstroz/yii2-wavecms-form
INWAVE - Internet Software House
inwave.eu