/** * @inheritdoc */ public function rules() { return [[['entity', 'text'], 'required'], [['entity', 'text'], 'string'], [['id'], 'integer'], [['id'], 'exist', 'targetClass' => Comments\models\Comment::className(), 'targetAttribute' => 'id']]; }
/** * Get default model classes */ protected function getDefaultModels() { return ['Comment' => Comments\models\Comment::className(), 'CommentQuery' => Comments\models\queries\CommentQuery::className(), 'CommentCreateForm' => Comments\forms\CommentCreateForm::className()]; }