2017 © Pedro Peláez
 

yii2-extension yii2-comments

Yii2-comments is a behavior and a set of widgets to enable generic commenting on Yii2-ActiveRecord-Models

image

asinfotrack/yii2-comments

Yii2-comments is a behavior and a set of widgets to enable generic commenting on Yii2-ActiveRecord-Models

  • Thursday, March 15, 2018
  • by asinfotrack
  • Repository
  • 5 Watchers
  • 6 Stars
  • 61 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 2 Versions
  • 3 % Grown

The README.md

Yii2-comments

Yii2-comments is a behavior and a set of widgets to enable commenting on Yii2-ActiveRecord-Models, (*1)

Advantages

This is not the first commenting extension. So why use this one? Those are some of the major advantages:, (*2)

  • this extension works with composite primary keys
  • the handling and configuration couldn't be simpler
  • awesome widgets to show, list and add comments

Installation

The preferred way to install this extension is through composer., (*3)

Either run, (*4)

$ composer require asinfotrack/yii2-comments

or add, (*5)

"asinfotrack/yii2-comments": "~0.8.2"

to the require section of your composer.json file., (*6)

Migration

After downloading everything you need to apply the migration creating the audit trail entry table:, (*7)

yii migrate --migrationPath=@vendor/asinfotrack/yii2-comments/migrations

To remove the table just do the same migration downwards., (*8)

Usage

Behavior

Attach the behavior to your model and you're done:, (*9)

public function behaviors()
{
    return [
        // ...
        'comments'=>[
            'class'=>CommentBehavior::class,

            //TODO: comment this
        ],
        // ...
    ];
}

Widget

The widget is also very easy to use. Just provide the model to get the audit trail for:, (*10)

<?= Comments::widget([
    'model'=>$model,

    // some of the optional configurations
    //TODO: comment this
]) ?>

Changelog

Learn about the latest improvements., (*11)

The Versions

15/03 2018

dev-master

9999999-dev

Yii2-comments is a behavior and a set of widgets to enable generic commenting on Yii2-ActiveRecord-Models

  Sources   Download

MIT

The Requires

 

yii2 bundle model widget behavior comments comment

15/03 2018

0.8.0

0.8.0.0

Yii2-comments is a behavior and a set of widgets to enable generic commenting on Yii2-ActiveRecord-Models

  Sources   Download

MIT

The Requires

 

yii2 bundle model widget behavior comments comment