it-yakutia/yii2-document

Documents for yii2

Installs: 15

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:yii2-extension

v1.0.0 2022-06-21 21:16 UTC

This package is auto-updated.

Last update: 2024-10-22 02:38:11 UTC


README

Document server for yii2

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist it-yakutia/yii2-document "*"

or add

"it-yakutia/yii2-document": "*"

to the require section of your composer.json file.

Add migration path in your console config file:

'controllerMap' => [
    ...
    'migrate' => [
    ...
        'migrationPath' => [
            ...
            '@ityakutia/document/migrations',
        ],
    ],
]

Usage

Once the extension is installed, simply use it in your code by :

<?= Url::toRoute(['/document/back/index']); ?>

Use in frontend:

<?= \ityakutia\document\widgets\document\DocumentWidget::widget(); ?>

Add RBAC roles:

document

Add fixtures:

php yii fixture Document --namespace='ityakutia\document\tests\fixtures'

Add fixtures in docker:

php yii fixture Document --namespace='ityakutia\document\tests\fixtures' --interactive=0
'custom_view_for_modules' => [
    'document_front' => [
        'index' => '@frontend/views/front_page/index',
        '_item' => '@frontend/views/front_page/_item',
    ],
],