rsemenyshyn / yii2-wiki
Yii2-Wiki is a flexible implementation of a wiki for Yii2
Installs: 26
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 7
Type:yii2-extension
Requires
- php: >=5.4.0
- erusev/parsedown: 1.7.*
- yiisoft/yii2: 2.0.*
- yiisoft/yii2-bootstrap: *
This package is auto-updated.
Last update: 2025-02-24 00:10:42 UTC
README
Yii2-Wiki is a flexible implementation of a wiki for Yii2
- can implement own layout
- can use rules for access control
- doesn't use DB, saves everything in files
Installation
The preferred way to install this extension is through composer.
Either run
$ composer require rsemenyshyn/yii2-wiki
or add
"rsemenyshyn/yii2-wiki": "dev-master"
to the require
section of your composer.json
file.
Configuration
Migration
For the default table structure execute the provided migration as follows:
yii migrate --migrationPath=@vendor/d4yii2/yii2-wiki/migrations
To remove the table just do the same migration downwards.
Configuring the module
add the following entry to the modules-part of your config-file:
//... 'modules'=>[ 'wiki'=>[ 'class'=>'d4yii2\yii2\wiki\Module', 'processContentCallback'=>function($content) { //example if you want to use markdown in your wiki return Parsedown::instance()->parse($content); }, //example for implementing other layout 'layout' => '@layout', 'viewMap' => [ 'admin'=>'@vendor/ea/eablankonthema/wiki_views/content/admin', 'view'=>'@vendor/ea/eablankonthema/wiki_views/content/view', 'create'=>'@vendor/ea/eablankonthema/wiki_views/content/create', 'update'=>'@vendor/ea/eablankonthema/wiki_views/content/update', ], 'rolesCanEdit' => ['WikiEdit'], 'rolesCanView' => ['@'] ], ], //...
For a full list of possible options check out the well documented attributes of the module-class.
Bootstrapping the module
This step is only necessary if you want to use the deafault url-rules provided by the module.
If you want to use this feature, add the module-id to the bootstrap-array of your config file:
//... 'bootstrap'=>['log', 'wiki'], //...