black-lamp/yii2-legal-agreement

Module for adding the legal agreements across dashboard

1.0.5 2017-05-03 16:03 UTC

This package is not auto-updated.

Last update: 2021-04-16 06:46:17 UTC


README

Module for adding the legal agreements across dashboard

Latest Stable Version Latest Unstable Version License

Installation

Run command

composer require black-lamp/yii2-legal-agreement

or add

"black-lamp/yii2-legal-agreement": "1.*.*"

to the require section of your composer.json.

Applying migrations

yii migrate --migrationPath=@vendor/black-lamp/yii2-legal-agreement/common/migrations

Add modules to application config

Frontend module for displaying and accepting the agreement

'modules' => [
     // ...
     'legal' => [
         'class' => bl\legalAgreement\frontend\LegalModule::className(),
     ],
]

Backend module for work with the agreements

'modules' => [
     // ...
     'legal' => [
         'class' => bl\legalAgreement\backend\LegalModule::className(),
         'languageProvider' => [
               'class' => bl\legalAgreement\backend\providers\DbLanguageProvider::className(),
               'arModel' => \bl\multilang\entities\Language::className(),
               'idField' => 'id',
               'nameField' => 'name'
         ]
     ],
]

Add component to application config

Component for work with agreements and users

'components' => 
[
    // ...
    'legal' => [
        'class' => bl\legalAgreement\common\components\LegalAgreement::className()
    ],
]