yii2-comments icon indicating copy to clipboard operation
yii2-comments copied to clipboard

Can't "edit comment" with event in config

Open akmaks opened this issue 7 years ago • 0 comments

Hi! I configured some events with basic Comment model. When I was trying to edit existing comment I have got Error "Class name must be a valid object or a string". For example, with this code "edit comment" don't working:

'comments' => [ 'class' => 'rmrevin\yii\module\Comments\Module', 'userIdentityClass' => 'frontend\models\User', 'useRbac' => false, 'modelMap' => [ 'Comment' => [ 'class' => 'rmrevin\yii\module\Comments\models\Comment', 'on ' . yii\db\ActiveRecord::EVENT_INIT => function($event) { print_r($event->sender); }, ], ], ],

akmaks avatar Dec 26 '17 14:12 akmaks