Skip to content

Latest commit

 

History

History
59 lines (57 loc) · 1.8 KB

README.md

File metadata and controls

59 lines (57 loc) · 1.8 KB

Legal agreement module for Yii2

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()
    ],
]