2017 © Pedro Peláez
 

yii2-extension yii2-universal-comment

Universal comment for yii2 framework

image

dmuratov/yii2-universal-comment

Universal comment for yii2 framework

  • Thursday, January 14, 2016
  • by dmuratov
  • Repository
  • 1 Watchers
  • 0 Stars
  • 160 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 42 % Grown

The README.md

CommentBehaviour for Yii2

That library include Comment model and CommentBehaviour. It is simple and fast way to provide easy adding comments for others models., (*1)

Installation

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

Either run, (*3)

composer require dmuratov/yii2-universal-comment:~1.0

or add, (*4)

"dmuratov/yii2-universal-comment" : "~1.0"

to the require section of your application's composer.json file., (*5)

Usage

Adding behaviour for model:, (*6)

public function behaviors()
{
    return [
        ...
        'comment' => [
            'class' => \dmuratov\comment\CommentBehaviour::className()
        ]
    ];
}

Adding comment for model, (*7)


$model->addComment('Comment text');

Getting comments, (*8)


$model->getComments()->all();

The Versions

14/01 2016

dev-master

9999999-dev

Universal comment for yii2 framework

  Sources   Download

BSD-3-Clause

The Requires

 

by Damir Muratov

extension yii2 yii comment