yii2-comments
yii2-comments copied to clipboard
Can't "edit comment" with event in config
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); }, ], ], ],