Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/black-lamp/yii2-legal-agreement
User agreement for the site.
https://github.com/black-lamp/yii2-legal-agreement
black-lamp php yii-extension yii2
Last synced: about 2 months ago
JSON representation
User agreement for the site.
- Host: GitHub
- URL: https://github.com/black-lamp/yii2-legal-agreement
- Owner: black-lamp
- License: gpl-3.0
- Created: 2016-09-28T15:58:40.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-05-03T16:03:39.000Z (over 7 years ago)
- Last Synced: 2024-04-25T13:00:36.648Z (8 months ago)
- Topics: black-lamp, php, yii-extension, yii2
- Language: PHP
- Size: 66.4 KB
- Stars: 0
- Watchers: 7
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
Legal agreement module for Yii2
===============================
Module for adding the legal agreements across dashboard[![Latest Stable Version](https://poser.pugx.org/black-lamp/yii2-legal-agreement/v/stable)](https://packagist.org/packages/black-lamp/yii2-legal-agreement)
[![Latest Unstable Version](https://poser.pugx.org/black-lamp/yii2-legal-agreement/v/unstable)](https://packagist.org/packages/black-lamp/yii2-legal-agreement)
[![License](https://poser.pugx.org/black-lamp/yii2-legal-agreement/license)](https://packagist.org/packages/black-lamp/yii2-legal-agreement)Installation
------------
#### Run command
```
composer require black-lamp/yii2-legal-agreement
```
or add
```json
"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
```php
'modules' => [
// ...
'legal' => [
'class' => bl\legalAgreement\frontend\LegalModule::className(),
],
]
```
Backend module for work with the agreements
```php
'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
```php
'components' =>
[
// ...
'legal' => [
'class' => bl\legalAgreement\common\components\LegalAgreement::className()
],
]
```