Commit 920dd24d94eed2182e9e0a8aa914c00b5f57d546

Authored by Yarik
1 parent 05c20a90

Comments

behaviors/CommentBehavior.php
... ... @@ -39,7 +39,7 @@
39 39 * @var bool
40 40 */
41 41 private $cacheRating = false;
42   -
  42 +
43 43 /**
44 44 * @inheritdoc
45 45 */
... ...
models/CommentModel.php
... ... @@ -3,6 +3,7 @@
3 3  
4 4 use artweb\artbox\comment\behaviors\ParentBehavior;
5 5 use artweb\artbox\comment\models\interfaces\CommentInterface;
  6 + use yii\base\InvalidConfigException;
6 7 use yii\behaviors\AttributeBehavior;
7 8 use yii\behaviors\BlameableBehavior;
8 9 use yii\behaviors\TimestampBehavior;
... ... @@ -43,6 +44,8 @@
43 44  
44 45 public $entityId;
45 46  
  47 + private $entityModel;
  48 +
46 49 public function scenarios()
47 50 {
48 51 $scenarios = parent::scenarios();
... ... @@ -63,7 +66,7 @@
63 66 ];
64 67 return $scenarios;
65 68 }
66   -
  69 +
67 70 public static function tableName()
68 71 {
69 72 return '{{%artbox_comment}}';
... ...
models/CommentModelSearch.php
... ... @@ -120,6 +120,7 @@
120 120 'status',
121 121 'entity',
122 122 'entity_id',
  123 + 'created_at',
123 124 ],
124 125 'defaultOrder' => [
125 126 'created_at' => SORT_DESC,
... ...
widgets/CommentWidget.php
... ... @@ -6,6 +6,7 @@
6 6 use artweb\artbox\comment\models\interfaces\CommentInterface;
7 7 use artweb\artbox\comment\models\RatingModel;
8 8 use artweb\artbox\comment\Module;
  9 + use artweb\artbox\models\Customer;
9 10 use Yii;
10 11 use yii\base\InvalidConfigException;
11 12 use yii\base\Model;
... ...