Commit 920dd24d94eed2182e9e0a8aa914c00b5f57d546

Authored by Yarik
1 parent 05c20a90

Comments

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