Skip to content

black-lamp/yii2-legal-agreement

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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